<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE BangPatterns #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE ExplicitForAll #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE FlexibleContexts #-}</span><span>
</span><span id="line-5"></span><span class="hs-pragma">{-# LANGUAGE FlexibleInstances #-}</span><span>
</span><span id="line-6"></span><span class="hs-pragma">{-# LANGUAGE GADTs #-}</span><span>
</span><span id="line-7"></span><span class="hs-pragma">{-# LANGUAGE MultiParamTypeClasses #-}</span><span>
</span><span id="line-8"></span><span class="hs-pragma">{-# LANGUAGE StandaloneDeriving #-}</span><span>
</span><span id="line-9"></span><span class="hs-pragma">{-# LANGUAGE UndecidableInstances #-}</span><span>
</span><span id="line-10"></span><span class="hs-pragma">{-# LANGUAGE ScopedTypeVariables #-}</span><span>
</span><span id="line-11"></span><span>
</span><span id="line-12"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}</span><span>
</span><span id="line-13"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-incomplete-uni-patterns   #-}</span><span>
</span><span id="line-14"></span><span>
</span><span id="line-15"></span><span class="hs-comment">-- CmmNode type for representation using Hoopl graphs.</span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Cmm.Node</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-18"></span><span>     </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier">CmmNode</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmFormal"><span class="hs-identifier">CmmFormal</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmActual"><span class="hs-identifier">CmmActual</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickish"><span class="hs-identifier">CmmTickish</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>     </span><span class="annot"><a href="GHC.Cmm.Node.html#UpdFrameOffset"><span class="hs-identifier">UpdFrameOffset</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#Convention"><span class="hs-identifier">Convention</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>     </span><span class="annot"><a href="GHC.Cmm.Node.html#ForeignConvention"><span class="hs-identifier">ForeignConvention</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier">ForeignTarget</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#foreignTargetHints"><span class="hs-identifier">foreignTargetHints</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>     </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmReturnInfo"><span class="hs-identifier">CmmReturnInfo</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>     </span><span class="annot"><a href="GHC.Cmm.Node.html#mapExp"><span class="hs-identifier">mapExp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#mapExpDeep"><span class="hs-identifier">mapExpDeep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#wrapRecExp"><span class="hs-identifier">wrapRecExp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#foldExp"><span class="hs-identifier">foldExp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#foldExpDeep"><span class="hs-identifier">foldExpDeep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#wrapRecExpf"><span class="hs-identifier">wrapRecExpf</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>     </span><span class="annot"><a href="GHC.Cmm.Node.html#mapExpM"><span class="hs-identifier">mapExpM</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#mapExpDeepM"><span class="hs-identifier">mapExpDeepM</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#wrapRecExpM"><span class="hs-identifier">wrapRecExpM</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#mapSuccessors"><span class="hs-identifier">mapSuccessors</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#mapCollectSuccessors"><span class="hs-identifier">mapCollectSuccessors</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span>     </span><span class="annot"><span class="hs-comment">-- * Tick scopes</span></span><span>
</span><span id="line-26"></span><span>     </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier">CmmTickScope</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#isTickSubScope"><span class="hs-identifier">isTickSubScope</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#combineTickScopes"><span class="hs-identifier">combineTickScopes</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-28"></span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Enum.html#succ"><span class="hs-identifier">succ</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Platform.Regs.html"><span class="hs-identifier">GHC.Platform.Regs</span></a></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html"><span class="hs-identifier">GHC.Cmm.Expr</span></a></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Switch.html"><span class="hs-identifier">GHC.Cmm.Switch</span></a></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.ForeignCall.html"><span class="hs-identifier">GHC.Types.ForeignCall</span></a></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html"><span class="hs-identifier">GHC.Runtime.Heap.Layout</span></a></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.html"><span class="hs-identifier">GHC.Core</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Tickish"><span class="hs-identifier">Tickish</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html"><span class="hs-identifier">GHC.Types.Unique</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">U</span></span><span>
</span><span id="line-41"></span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Block</span></a></span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Graph</span></a></span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Collections.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Collections</span></a></span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Label</span></a></span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Maybe.html#"><span class="hs-identifier">Data.Maybe</span></a></span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.OldList.html#tails"><span class="hs-identifier">tails</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier">sortBy</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html"><span class="hs-identifier">GHC.Types.Unique</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Unique.html#nonDetCmpUnique"><span class="hs-identifier">nonDetCmpUnique</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span class="hs-comment">------------------------</span><span>
</span><span id="line-53"></span><span class="hs-comment">-- CmmNode</span><span class="hs-cpp">

#define ULabel {-# UNPACK #-} !Label
</span><span>
</span><span id="line-57"></span><span class="hs-keyword">data</span><span> </span><span id="CmmNode"><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-var">CmmNode</span></a></span></span><span> </span><span id="local-6989586621680935352"><span class="annot"><a href="#local-6989586621680935352"><span class="hs-identifier hs-type">e</span></a></span></span><span> </span><span id="local-6989586621680935351"><span class="annot"><a href="#local-6989586621680935351"><span class="hs-identifier hs-type">x</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-58"></span><span>  </span><span id="CmmEntry"><span class="annot"><a href="GHC.Cmm.Node.html#CmmEntry"><span class="hs-identifier hs-var">CmmEntry</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ULabel</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">CmmTickScope</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">CmmNode</span><span> </span><span class="hs-identifier">C</span><span> </span><span class="hs-identifier">O</span><span>
</span><span id="line-59"></span><span>
</span><span id="line-60"></span><span>  </span><span id="CmmComment"><span class="annot"><a href="GHC.Cmm.Node.html#CmmComment"><span class="hs-identifier hs-var">CmmComment</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span>    </span><span class="hs-comment">-- Tick annotation, covering Cmm code in our tick scope. We only</span><span>
</span><span id="line-63"></span><span>    </span><span class="hs-comment">-- expect non-code @Tickish@ at this point (e.g. @SourceNote@).</span><span>
</span><span id="line-64"></span><span>    </span><span class="hs-comment">-- See Note [CmmTick scoping details]</span><span>
</span><span id="line-65"></span><span>  </span><span id="CmmTick"><span class="annot"><a href="GHC.Cmm.Node.html#CmmTick"><span class="hs-identifier hs-var">CmmTick</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickish"><span class="hs-identifier hs-type">CmmTickish</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span>
</span><span id="line-66"></span><span>
</span><span id="line-67"></span><span>    </span><span class="hs-comment">-- Unwind pseudo-instruction, encoding stack unwinding</span><span>
</span><span id="line-68"></span><span>    </span><span class="hs-comment">-- instructions for a debugger. This describes how to reconstruct</span><span>
</span><span id="line-69"></span><span>    </span><span class="hs-comment">-- the &quot;old&quot; value of a register if we want to navigate the stack</span><span>
</span><span id="line-70"></span><span>    </span><span class="hs-comment">-- up one frame. Having unwind information for @Sp@ will allow the</span><span>
</span><span id="line-71"></span><span>    </span><span class="hs-comment">-- debugger to &quot;walk&quot; the stack.</span><span>
</span><span id="line-72"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-73"></span><span>    </span><span class="hs-comment">-- See Note [What is this unwinding business?] in &quot;GHC.Cmm.DebugBlock&quot;</span><span>
</span><span id="line-74"></span><span>  </span><span id="CmmUnwind"><span class="annot"><a href="GHC.Cmm.Node.html#CmmUnwind"><span class="hs-identifier hs-var">CmmUnwind</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#GlobalReg"><span class="hs-identifier hs-type">GlobalReg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span>
</span><span id="line-75"></span><span>
</span><span id="line-76"></span><span>  </span><span id="CmmAssign"><span class="annot"><a href="GHC.Cmm.Node.html#CmmAssign"><span class="hs-identifier hs-var">CmmAssign</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmReg"><span class="hs-identifier hs-type">CmmReg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span>
</span><span id="line-77"></span><span>    </span><span class="hs-comment">-- Assign to register</span><span>
</span><span id="line-78"></span><span>
</span><span id="line-79"></span><span>  </span><span id="CmmStore"><span class="annot"><a href="GHC.Cmm.Node.html#CmmStore"><span class="hs-identifier hs-var">CmmStore</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span>
</span><span id="line-80"></span><span>    </span><span class="hs-comment">-- Assign to memory location.  Size is</span><span>
</span><span id="line-81"></span><span>    </span><span class="hs-comment">-- given by cmmExprType of the rhs.</span><span>
</span><span id="line-82"></span><span>
</span><span id="line-83"></span><span>  </span><span id="CmmUnsafeForeignCall"><span class="annot"><a href="GHC.Cmm.Node.html#CmmUnsafeForeignCall"><span class="hs-identifier hs-var">CmmUnsafeForeignCall</span></a></span></span><span> </span><span class="hs-glyph">::</span><span>       </span><span class="hs-comment">-- An unsafe foreign call;</span><span>
</span><span id="line-84"></span><span>                                </span><span class="hs-comment">-- see Note [Foreign calls]</span><span>
</span><span id="line-85"></span><span>                                </span><span class="hs-comment">-- Like a &quot;fat machine instruction&quot;; can occur</span><span>
</span><span id="line-86"></span><span>                                </span><span class="hs-comment">-- in the middle of a block</span><span>
</span><span id="line-87"></span><span>      </span><span class="annot"><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier hs-type">ForeignTarget</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>          </span><span class="hs-comment">-- call target</span><span>
</span><span id="line-88"></span><span>      </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmFormal"><span class="hs-identifier hs-type">CmmFormal</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span>            </span><span class="hs-comment">-- zero or more results</span><span>
</span><span id="line-89"></span><span>      </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmActual"><span class="hs-identifier hs-type">CmmActual</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span>            </span><span class="hs-comment">-- zero or more arguments</span><span>
</span><span id="line-90"></span><span>      </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span>
</span><span id="line-91"></span><span>      </span><span class="hs-comment">-- Semantics: clobbers any GlobalRegs for which callerSaves r == True</span><span>
</span><span id="line-92"></span><span>      </span><span class="hs-comment">-- See Note [Unsafe foreign calls clobber caller-save registers]</span><span>
</span><span id="line-93"></span><span>      </span><span class="hs-comment">--</span><span>
</span><span id="line-94"></span><span>      </span><span class="hs-comment">-- Invariant: the arguments and the ForeignTarget must not</span><span>
</span><span id="line-95"></span><span>      </span><span class="hs-comment">-- mention any registers for which GHC.Platform.callerSaves</span><span>
</span><span id="line-96"></span><span>      </span><span class="hs-comment">-- is True.  See Note [Register parameter passing].</span><span>
</span><span id="line-97"></span><span>
</span><span id="line-98"></span><span>  </span><span id="CmmBranch"><span class="annot"><a href="GHC.Cmm.Node.html#CmmBranch"><span class="hs-identifier hs-var">CmmBranch</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ULabel</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">CmmNode</span><span> </span><span class="hs-identifier">O</span><span> </span><span class="hs-identifier">C</span><span>
</span><span id="line-99"></span><span>                                   </span><span class="hs-comment">-- Goto another block in the same procedure</span><span>
</span><span id="line-100"></span><span>
</span><span id="line-101"></span><span>  </span><span id="CmmCondBranch"><span class="annot"><a href="GHC.Cmm.Node.html#CmmCondBranch"><span class="hs-identifier hs-var">CmmCondBranch</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">{</span><span>                 </span><span class="hs-comment">-- conditional branch</span><span>
</span><span id="line-102"></span><span>      </span><span id="cml_pred"><span class="annot"><span class="annottext">CmmNode 'Open 'Closed -&gt; CmmExpr
</span><a href="GHC.Cmm.Node.html#cml_pred"><span class="hs-identifier hs-var hs-var">cml_pred</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-103"></span><span>      </span><span id="cml_true"><span class="annot"><span class="annottext">CmmNode 'Open 'Closed -&gt; Label
</span><a href="GHC.Cmm.Node.html#cml_true"><span class="hs-identifier hs-var hs-var">cml_true</span></a></span></span><span class="hs-special">,</span><span> </span><span id="cml_false"><span class="annot"><span class="annottext">CmmNode 'Open 'Closed -&gt; Label
</span><a href="GHC.Cmm.Node.html#cml_false"><span class="hs-identifier hs-var hs-var">cml_false</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ULabel</span><span class="hs-special">,</span><span>
</span><span id="line-104"></span><span>      </span><span id="cml_likely"><span class="annot"><span class="annottext">CmmNode 'Open 'Closed -&gt; Maybe Bool
</span><a href="GHC.Cmm.Node.html#cml_likely"><span class="hs-identifier hs-var hs-var">cml_likely</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>       </span><span class="hs-comment">-- likely result of the conditional,</span><span>
</span><span id="line-105"></span><span>                                     </span><span class="hs-comment">-- if known</span><span>
</span><span id="line-106"></span><span>  </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span>  </span><span id="CmmSwitch"><span class="annot"><a href="GHC.Cmm.Node.html#CmmSwitch"><span class="hs-identifier hs-var">CmmSwitch</span></a></span></span><span>
</span><span id="line-109"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span>       </span><span class="hs-comment">-- Scrutinee, of some integral type</span><span>
</span><span id="line-110"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Switch.html#SwitchTargets"><span class="hs-identifier hs-type">SwitchTargets</span></a></span><span> </span><span class="hs-comment">-- Cases. See [Note SwitchTargets]</span><span>
</span><span id="line-111"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span>  </span><span id="CmmCall"><span class="annot"><a href="GHC.Cmm.Node.html#CmmCall"><span class="hs-identifier hs-var">CmmCall</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">{</span><span>                </span><span class="hs-comment">-- A native call or tail call</span><span>
</span><span id="line-114"></span><span>      </span><span id="cml_target"><span class="annot"><span class="annottext">CmmNode 'Open 'Closed -&gt; CmmExpr
</span><a href="GHC.Cmm.Node.html#cml_target"><span class="hs-identifier hs-var hs-var">cml_target</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span class="hs-special">,</span><span>  </span><span class="hs-comment">-- never a CmmPrim to a CallishMachOp!</span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span>      </span><span id="cml_cont"><span class="annot"><span class="annottext">CmmNode 'Open 'Closed -&gt; Maybe Label
</span><a href="GHC.Cmm.Node.html#cml_cont"><span class="hs-identifier hs-var hs-var">cml_cont</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#Label"><span class="hs-identifier hs-type">Label</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-117"></span><span>          </span><span class="hs-comment">-- Label of continuation (Nothing for return or tail call)</span><span>
</span><span id="line-118"></span><span>          </span><span class="hs-comment">--</span><span>
</span><span id="line-119"></span><span>          </span><span class="hs-comment">-- Note [Continuation BlockIds]: these BlockIds are called</span><span>
</span><span id="line-120"></span><span>          </span><span class="hs-comment">-- Continuation BlockIds, and are the only BlockIds that can</span><span>
</span><span id="line-121"></span><span>          </span><span class="hs-comment">-- occur in CmmExprs, namely as (CmmLit (CmmBlock b)) or</span><span>
</span><span id="line-122"></span><span>          </span><span class="hs-comment">-- (CmmStackSlot (Young b) _).</span><span>
</span><span id="line-123"></span><span>
</span><span id="line-124"></span><span>      </span><span id="cml_args_regs"><span class="annot"><span class="annottext">CmmNode 'Open 'Closed -&gt; [GlobalReg]
</span><a href="GHC.Cmm.Node.html#cml_args_regs"><span class="hs-identifier hs-var hs-var">cml_args_regs</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#GlobalReg"><span class="hs-identifier hs-type">GlobalReg</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-125"></span><span>          </span><span class="hs-comment">-- The argument GlobalRegs (Rx, Fx, Dx, Lx) that are passed</span><span>
</span><span id="line-126"></span><span>          </span><span class="hs-comment">-- to the call.  This is essential information for the</span><span>
</span><span id="line-127"></span><span>          </span><span class="hs-comment">-- native code generator's register allocator; without</span><span>
</span><span id="line-128"></span><span>          </span><span class="hs-comment">-- knowing which GlobalRegs are live it has to assume that</span><span>
</span><span id="line-129"></span><span>          </span><span class="hs-comment">-- they are all live.  This list should only include</span><span>
</span><span id="line-130"></span><span>          </span><span class="hs-comment">-- GlobalRegs that are mapped to real machine registers on</span><span>
</span><span id="line-131"></span><span>          </span><span class="hs-comment">-- the target platform.</span><span>
</span><span id="line-132"></span><span>
</span><span id="line-133"></span><span>      </span><span id="cml_args"><span class="annot"><span class="annottext">CmmNode 'Open 'Closed -&gt; ByteOff
</span><a href="GHC.Cmm.Node.html#cml_args"><span class="hs-identifier hs-var hs-var">cml_args</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-134"></span><span>          </span><span class="hs-comment">-- Byte offset, from the *old* end of the Area associated with</span><span>
</span><span id="line-135"></span><span>          </span><span class="hs-comment">-- the Label (if cml_cont = Nothing, then Old area), of</span><span>
</span><span id="line-136"></span><span>          </span><span class="hs-comment">-- youngest outgoing arg.  Set the stack pointer to this before</span><span>
</span><span id="line-137"></span><span>          </span><span class="hs-comment">-- transferring control.</span><span>
</span><span id="line-138"></span><span>          </span><span class="hs-comment">-- (NB: an update frame might also have been stored in the Old</span><span>
</span><span id="line-139"></span><span>          </span><span class="hs-comment">--      area, but it'll be in an older part than the args.)</span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span>      </span><span id="cml_ret_args"><span class="annot"><span class="annottext">CmmNode 'Open 'Closed -&gt; ByteOff
</span><a href="GHC.Cmm.Node.html#cml_ret_args"><span class="hs-identifier hs-var hs-var">cml_ret_args</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-142"></span><span>          </span><span class="hs-comment">-- For calls *only*, the byte offset for youngest returned value</span><span>
</span><span id="line-143"></span><span>          </span><span class="hs-comment">-- This is really needed at the *return* point rather than here</span><span>
</span><span id="line-144"></span><span>          </span><span class="hs-comment">-- at the call, but in practice it's convenient to record it here.</span><span>
</span><span id="line-145"></span><span>
</span><span id="line-146"></span><span>      </span><span id="cml_ret_off"><span class="annot"><span class="annottext">CmmNode 'Open 'Closed -&gt; ByteOff
</span><a href="GHC.Cmm.Node.html#cml_ret_off"><span class="hs-identifier hs-var hs-var">cml_ret_off</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span>
</span><span id="line-147"></span><span>        </span><span class="hs-comment">-- For calls *only*, the byte offset of the base of the frame that</span><span>
</span><span id="line-148"></span><span>        </span><span class="hs-comment">-- must be described by the info table for the return point.</span><span>
</span><span id="line-149"></span><span>        </span><span class="hs-comment">-- The older words are an update frames, which have their own</span><span>
</span><span id="line-150"></span><span>        </span><span class="hs-comment">-- info-table and layout information</span><span>
</span><span id="line-151"></span><span>
</span><span id="line-152"></span><span>        </span><span class="hs-comment">-- From a liveness point of view, the stack words older than</span><span>
</span><span id="line-153"></span><span>        </span><span class="hs-comment">-- cml_ret_off are treated as live, even if the sequel of</span><span>
</span><span id="line-154"></span><span>        </span><span class="hs-comment">-- the call goes into a loop.</span><span>
</span><span id="line-155"></span><span>  </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span>  </span><span id="CmmForeignCall"><span class="annot"><a href="GHC.Cmm.Node.html#CmmForeignCall"><span class="hs-identifier hs-var">CmmForeignCall</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">{</span><span>           </span><span class="hs-comment">-- A safe foreign call; see Note [Foreign calls]</span><span>
</span><span id="line-158"></span><span>                                </span><span class="hs-comment">-- Always the last node of a block</span><span>
</span><span id="line-159"></span><span>      </span><span id="tgt"><span class="annot"><span class="annottext">CmmNode 'Open 'Closed -&gt; ForeignTarget
</span><a href="GHC.Cmm.Node.html#tgt"><span class="hs-identifier hs-var hs-var">tgt</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier hs-type">ForeignTarget</span></a></span><span class="hs-special">,</span><span>   </span><span class="hs-comment">-- call target and convention</span><span>
</span><span id="line-160"></span><span>      </span><span id="res"><span class="annot"><span class="annottext">CmmNode 'Open 'Closed -&gt; [CmmFormal]
</span><a href="GHC.Cmm.Node.html#res"><span class="hs-identifier hs-var hs-var">res</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmFormal"><span class="hs-identifier hs-type">CmmFormal</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>     </span><span class="hs-comment">-- zero or more results</span><span>
</span><span id="line-161"></span><span>      </span><span id="args"><span class="annot"><span class="annottext">CmmNode 'Open 'Closed -&gt; [CmmExpr]
</span><a href="GHC.Cmm.Node.html#args"><span class="hs-identifier hs-var hs-var">args</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmActual"><span class="hs-identifier hs-type">CmmActual</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>     </span><span class="hs-comment">-- zero or more arguments; see Note [Register parameter passing]</span><span>
</span><span id="line-162"></span><span>      </span><span id="succ"><span class="annot"><span class="annottext">CmmNode 'Open 'Closed -&gt; Label
</span><a href="GHC.Cmm.Node.html#succ"><span class="hs-identifier hs-var hs-var">succ</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">ULabel</span><span class="hs-special">,</span><span>          </span><span class="hs-comment">-- Label of continuation</span><span>
</span><span id="line-163"></span><span>      </span><span id="ret_args"><span class="annot"><span class="annottext">CmmNode 'Open 'Closed -&gt; ByteOff
</span><a href="GHC.Cmm.Node.html#ret_args"><span class="hs-identifier hs-var hs-var">ret_args</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span class="hs-special">,</span><span>      </span><span class="hs-comment">-- same as cml_ret_args</span><span>
</span><span id="line-164"></span><span>      </span><span id="ret_off"><span class="annot"><span class="annottext">CmmNode 'Open 'Closed -&gt; ByteOff
</span><a href="GHC.Cmm.Node.html#ret_off"><span class="hs-identifier hs-var hs-var">ret_off</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span class="hs-special">,</span><span>       </span><span class="hs-comment">-- same as cml_ret_off</span><span>
</span><span id="line-165"></span><span>      </span><span id="intrbl"><span class="annot"><span class="annottext">CmmNode 'Open 'Closed -&gt; Bool
</span><a href="GHC.Cmm.Node.html#intrbl"><span class="hs-identifier hs-var hs-var">intrbl</span></a></span></span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>             </span><span class="hs-comment">-- whether or not the call is interruptible</span><span>
</span><span id="line-166"></span><span>  </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span>
</span><span id="line-167"></span><span>
</span><span id="line-168"></span><span class="hs-comment">{- Note [Foreign calls]
~~~~~~~~~~~~~~~~~~~~~~~
A CmmUnsafeForeignCall is used for *unsafe* foreign calls;
a CmmForeignCall call is used for *safe* foreign calls.

Unsafe ones are mostly easy: think of them as a &quot;fat machine
instruction&quot;.  In particular, they do *not* kill all live registers,
just the registers they return to (there was a bit of code in GHC that
conservatively assumed otherwise.)  However, see [Register parameter passing].

Safe ones are trickier.  A safe foreign call
     r = f(x)
ultimately expands to
     push &quot;return address&quot;      -- Never used to return to;
                                -- just points an info table
     save registers into TSO
     call suspendThread
     r = f(x)                   -- Make the call
     call resumeThread
     restore registers
     pop &quot;return address&quot;
We cannot &quot;lower&quot; a safe foreign call to this sequence of Cmms, because
after we've saved Sp all the Cmm optimiser's assumptions are broken.

Note that a safe foreign call needs an info table.

So Safe Foreign Calls must remain as last nodes until the stack is
made manifest in GHC.Cmm.LayoutStack, where they are lowered into the above
sequence.
-}</span><span>
</span><span id="line-198"></span><span>
</span><span id="line-199"></span><span class="hs-comment">{- Note [Unsafe foreign calls clobber caller-save registers]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

A foreign call is defined to clobber any GlobalRegs that are mapped to
caller-saves machine registers (according to the prevailing C ABI).
GHC.StgToCmm.Utils.callerSaves tells you which GlobalRegs are caller-saves.

This is a design choice that makes it easier to generate code later.
We could instead choose to say that foreign calls do *not* clobber
caller-saves regs, but then we would have to figure out which regs
were live across the call later and insert some saves/restores.

Furthermore when we generate code we never have any GlobalRegs live
across a call, because they are always copied-in to LocalRegs and
copied-out again before making a call/jump.  So all we have to do is
avoid any code motion that would make a caller-saves GlobalReg live
across a foreign call during subsequent optimisations.
-}</span><span>
</span><span id="line-217"></span><span>
</span><span id="line-218"></span><span class="hs-comment">{- Note [Register parameter passing]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
On certain architectures, some registers are utilized for parameter
passing in the C calling convention.  For example, in x86-64 Linux
convention, rdi, rsi, rdx and rcx (as well as r8 and r9) may be used for
argument passing.  These are registers R3-R6, which our generated
code may also be using; as a result, it's necessary to save these
values before doing a foreign call.  This is done during initial
code generation in callerSaveVolatileRegs in GHC.StgToCmm.Utils.

However, one result of doing this is that the contents of these registers may
mysteriously change if referenced inside the arguments.  This is dangerous, so
you'll need to disable inlining much in the same way is done in GHC.Cmm.Sink
currently.  We should fix this!
-}</span><span>
</span><span id="line-233"></span><span>
</span><span id="line-234"></span><span class="hs-comment">---------------------------------------------</span><span>
</span><span id="line-235"></span><span class="hs-comment">-- Eq instance of CmmNode</span><span>
</span><span id="line-236"></span><span>
</span><span id="line-237"></span><span id="local-6989586621680935282"><span id="local-6989586621680935284"><span id="local-6989586621680935666"><span id="local-6989586621680935667"><span class="hs-keyword">deriving</span><span> </span><span class="hs-keyword">instance</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935667"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935666"><span class="hs-identifier hs-type">x</span></a></span><span class="hs-special">)</span></span></span></span></span><span>
</span><span id="line-238"></span><span>
</span><span id="line-239"></span><span class="hs-comment">----------------------------------------------</span><span>
</span><span id="line-240"></span><span class="hs-comment">-- Hoopl instances of CmmNode</span><span>
</span><span id="line-241"></span><span>
</span><span id="line-242"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#NonLocal"><span class="hs-identifier hs-type">NonLocal</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-243"></span><span>  </span><span id="local-6989586621680935276"><span class="annot"><span class="annottext">entryLabel :: forall (x :: Extensibility). CmmNode 'Closed x -&gt; Label
</span><a href="GHC.Cmm.Dataflow.Graph.html#entryLabel"><span class="hs-identifier hs-var hs-var hs-var hs-var">entryLabel</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmEntry"><span class="hs-identifier hs-type">CmmEntry</span></a></span><span> </span><span id="local-6989586621680935272"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680935272"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680935272"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-244"></span><span>
</span><span id="line-245"></span><span>  </span><span id="local-6989586621680935271"><span class="annot"><span class="annottext">successors :: forall (e :: Extensibility). CmmNode e 'Closed -&gt; [Label]
</span><a href="GHC.Cmm.Dataflow.Graph.html#successors"><span class="hs-identifier hs-var hs-var hs-var hs-var">successors</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmBranch"><span class="hs-identifier hs-type">CmmBranch</span></a></span><span> </span><span id="local-6989586621680935267"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680935267"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680935267"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-246"></span><span>  </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#successors"><span class="hs-identifier hs-var">successors</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmCondBranch"><span class="hs-identifier hs-type">CmmCondBranch</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">cml_true :: CmmNode 'Open 'Closed -&gt; Label
</span><a href="GHC.Cmm.Node.html#cml_true"><span class="hs-identifier hs-var">cml_true</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621680935264"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680935264"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cml_false :: CmmNode 'Open 'Closed -&gt; Label
</span><a href="GHC.Cmm.Node.html#cml_false"><span class="hs-identifier hs-var">cml_false</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621680935263"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680935263"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680935263"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680935264"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- meets layout constraint</span><span>
</span><span id="line-247"></span><span>  </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#successors"><span class="hs-identifier hs-var">successors</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmSwitch"><span class="hs-identifier hs-type">CmmSwitch</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680935260"><span class="annot"><span class="annottext">SwitchTargets
</span><a href="#local-6989586621680935260"><span class="hs-identifier hs-var">ids</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SwitchTargets -&gt; [Label]
</span><a href="GHC.Cmm.Switch.html#switchTargetsToList"><span class="hs-identifier hs-var">switchTargetsToList</span></a></span><span> </span><span class="annot"><span class="annottext">SwitchTargets
</span><a href="#local-6989586621680935260"><span class="hs-identifier hs-var">ids</span></a></span><span>
</span><span id="line-248"></span><span>  </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#successors"><span class="hs-identifier hs-var">successors</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmCall"><span class="hs-identifier hs-type">CmmCall</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">cml_cont :: CmmNode 'Open 'Closed -&gt; Maybe Label
</span><a href="GHC.Cmm.Node.html#cml_cont"><span class="hs-identifier hs-var">cml_cont</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621680935256"><span class="annot"><span class="annottext">Maybe Label
</span><a href="#local-6989586621680935256"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Label -&gt; [Label]
forall a. Maybe a -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#maybeToList"><span class="hs-identifier hs-var">maybeToList</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Label
</span><a href="#local-6989586621680935256"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-249"></span><span>  </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#successors"><span class="hs-identifier hs-var">successors</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmForeignCall"><span class="hs-identifier hs-type">CmmForeignCall</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">succ :: CmmNode 'Open 'Closed -&gt; Label
</span><a href="GHC.Cmm.Node.html#succ"><span class="hs-identifier hs-var">succ</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621680935252"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680935252"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680935252"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-250"></span><span>
</span><span id="line-251"></span><span>
</span><span id="line-252"></span><span class="hs-comment">--------------------------------------------------</span><span>
</span><span id="line-253"></span><span class="hs-comment">-- Various helper types</span><span>
</span><span id="line-254"></span><span>
</span><span id="line-255"></span><span class="hs-keyword">type</span><span> </span><span id="CmmActual"><span class="annot"><a href="GHC.Cmm.Node.html#CmmActual"><span class="hs-identifier hs-var">CmmActual</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span>
</span><span id="line-256"></span><span class="hs-keyword">type</span><span> </span><span id="CmmFormal"><span class="annot"><a href="GHC.Cmm.Node.html#CmmFormal"><span class="hs-identifier hs-var">CmmFormal</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#LocalReg"><span class="hs-identifier hs-type">LocalReg</span></a></span><span>
</span><span id="line-257"></span><span>
</span><span id="line-258"></span><span class="hs-keyword">type</span><span> </span><span id="UpdFrameOffset"><span class="annot"><a href="GHC.Cmm.Node.html#UpdFrameOffset"><span class="hs-identifier hs-var">UpdFrameOffset</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span>
</span><span id="line-259"></span><span>
</span><span id="line-260"></span><span class="hs-comment">-- | A convention maps a list of values (function arguments or return</span><span>
</span><span id="line-261"></span><span class="hs-comment">-- values) to registers or stack locations.</span><span>
</span><span id="line-262"></span><span class="hs-keyword">data</span><span> </span><span id="Convention"><span class="annot"><a href="GHC.Cmm.Node.html#Convention"><span class="hs-identifier hs-var">Convention</span></a></span></span><span>
</span><span id="line-263"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="NativeDirectCall"><span class="annot"><a href="GHC.Cmm.Node.html#NativeDirectCall"><span class="hs-identifier hs-var">NativeDirectCall</span></a></span></span><span>
</span><span id="line-264"></span><span>       </span><span class="hs-comment">-- ^ top-level Haskell functions use @NativeDirectCall@, which</span><span>
</span><span id="line-265"></span><span>       </span><span class="hs-comment">-- maps arguments to registers starting with R2, according to</span><span>
</span><span id="line-266"></span><span>       </span><span class="hs-comment">-- how many registers are available on the platform.  This</span><span>
</span><span id="line-267"></span><span>       </span><span class="hs-comment">-- convention ignores R1, because for a top-level function call</span><span>
</span><span id="line-268"></span><span>       </span><span class="hs-comment">-- the function closure is implicit, and doesn't need to be passed.</span><span>
</span><span id="line-269"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="NativeNodeCall"><span class="annot"><a href="GHC.Cmm.Node.html#NativeNodeCall"><span class="hs-identifier hs-var">NativeNodeCall</span></a></span></span><span>
</span><span id="line-270"></span><span>       </span><span class="hs-comment">-- ^ non-top-level Haskell functions, which pass the address of</span><span>
</span><span id="line-271"></span><span>       </span><span class="hs-comment">-- the function closure in R1 (regardless of whether R1 is a</span><span>
</span><span id="line-272"></span><span>       </span><span class="hs-comment">-- real register or not), and the rest of the arguments in</span><span>
</span><span id="line-273"></span><span>       </span><span class="hs-comment">-- registers or on the stack.</span><span>
</span><span id="line-274"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="NativeReturn"><span class="annot"><a href="GHC.Cmm.Node.html#NativeReturn"><span class="hs-identifier hs-var">NativeReturn</span></a></span></span><span>
</span><span id="line-275"></span><span>       </span><span class="hs-comment">-- ^ a native return.  The convention for returns depends on</span><span>
</span><span id="line-276"></span><span>       </span><span class="hs-comment">-- how many values are returned: for just one value returned,</span><span>
</span><span id="line-277"></span><span>       </span><span class="hs-comment">-- the appropriate register is used (R1, F1, etc.). regardless</span><span>
</span><span id="line-278"></span><span>       </span><span class="hs-comment">-- of whether it is a real register or not.  For multiple</span><span>
</span><span id="line-279"></span><span>       </span><span class="hs-comment">-- values returned, they are mapped to registers or the stack.</span><span>
</span><span id="line-280"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Slow"><span class="annot"><a href="GHC.Cmm.Node.html#Slow"><span class="hs-identifier hs-var">Slow</span></a></span></span><span>
</span><span id="line-281"></span><span>       </span><span class="hs-comment">-- ^ Slow entry points: all args pushed on the stack</span><span>
</span><span id="line-282"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="GC"><span class="annot"><a href="GHC.Cmm.Node.html#GC"><span class="hs-identifier hs-var">GC</span></a></span></span><span>
</span><span id="line-283"></span><span>       </span><span class="hs-comment">-- ^ Entry to the garbage collector: uses the node reg!</span><span>
</span><span id="line-284"></span><span>       </span><span class="hs-comment">-- (TODO: I don't think we need this --SDM)</span><span>
</span><span id="line-285"></span><span>  </span><span class="hs-keyword">deriving</span><span class="hs-special">(</span><span> </span><span id="local-6989586621680935242"><span id="local-6989586621680935244"><span class="annot"><span class="annottext">Convention -&gt; Convention -&gt; Bool
(Convention -&gt; Convention -&gt; Bool)
-&gt; (Convention -&gt; Convention -&gt; Bool) -&gt; Eq Convention
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: Convention -&gt; Convention -&gt; Bool
$c/= :: Convention -&gt; Convention -&gt; Bool
== :: Convention -&gt; Convention -&gt; Bool
$c== :: Convention -&gt; Convention -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-286"></span><span>
</span><span id="line-287"></span><span class="hs-keyword">data</span><span> </span><span id="ForeignConvention"><span class="annot"><a href="GHC.Cmm.Node.html#ForeignConvention"><span class="hs-identifier hs-var">ForeignConvention</span></a></span></span><span>
</span><span id="line-288"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="ForeignConvention"><span class="annot"><a href="GHC.Cmm.Node.html#ForeignConvention"><span class="hs-identifier hs-var">ForeignConvention</span></a></span></span><span>
</span><span id="line-289"></span><span>        </span><span class="annot"><a href="GHC.Types.ForeignCall.html#CCallConv"><span class="hs-identifier hs-type">CCallConv</span></a></span><span>               </span><span class="hs-comment">-- Which foreign-call convention</span><span>
</span><span id="line-290"></span><span>        </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Type.html#ForeignHint"><span class="hs-identifier hs-type">ForeignHint</span></a></span><span class="hs-special">]</span><span>           </span><span class="hs-comment">-- Extra info about the args</span><span>
</span><span id="line-291"></span><span>        </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Type.html#ForeignHint"><span class="hs-identifier hs-type">ForeignHint</span></a></span><span class="hs-special">]</span><span>           </span><span class="hs-comment">-- Extra info about the result</span><span>
</span><span id="line-292"></span><span>        </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmReturnInfo"><span class="hs-identifier hs-type">CmmReturnInfo</span></a></span><span>
</span><span id="line-293"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span id="local-6989586621680935231"><span id="local-6989586621680935239"><span class="annot"><span class="annottext">ForeignConvention -&gt; ForeignConvention -&gt; Bool
(ForeignConvention -&gt; ForeignConvention -&gt; Bool)
-&gt; (ForeignConvention -&gt; ForeignConvention -&gt; Bool)
-&gt; Eq ForeignConvention
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: ForeignConvention -&gt; ForeignConvention -&gt; Bool
$c/= :: ForeignConvention -&gt; ForeignConvention -&gt; Bool
== :: ForeignConvention -&gt; ForeignConvention -&gt; Bool
$c== :: ForeignConvention -&gt; ForeignConvention -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span>
</span><span id="line-294"></span><span>
</span><span id="line-295"></span><span class="hs-keyword">data</span><span> </span><span id="CmmReturnInfo"><span class="annot"><a href="GHC.Cmm.Node.html#CmmReturnInfo"><span class="hs-identifier hs-var">CmmReturnInfo</span></a></span></span><span>
</span><span id="line-296"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="CmmMayReturn"><span class="annot"><a href="GHC.Cmm.Node.html#CmmMayReturn"><span class="hs-identifier hs-var">CmmMayReturn</span></a></span></span><span>
</span><span id="line-297"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CmmNeverReturns"><span class="annot"><a href="GHC.Cmm.Node.html#CmmNeverReturns"><span class="hs-identifier hs-var">CmmNeverReturns</span></a></span></span><span>
</span><span id="line-298"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span> </span><span id="local-6989586621680935224"><span id="local-6989586621680935226"><span class="annot"><span class="annottext">CmmReturnInfo -&gt; CmmReturnInfo -&gt; Bool
(CmmReturnInfo -&gt; CmmReturnInfo -&gt; Bool)
-&gt; (CmmReturnInfo -&gt; CmmReturnInfo -&gt; Bool) -&gt; Eq CmmReturnInfo
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: CmmReturnInfo -&gt; CmmReturnInfo -&gt; Bool
$c/= :: CmmReturnInfo -&gt; CmmReturnInfo -&gt; Bool
== :: CmmReturnInfo -&gt; CmmReturnInfo -&gt; Bool
$c== :: CmmReturnInfo -&gt; CmmReturnInfo -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-299"></span><span>
</span><span id="line-300"></span><span class="hs-keyword">data</span><span> </span><span id="ForeignTarget"><span class="annot"><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier hs-var">ForeignTarget</span></a></span></span><span>        </span><span class="hs-comment">-- The target of a foreign call</span><span>
</span><span id="line-301"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="ForeignTarget"><span class="annot"><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier hs-var">ForeignTarget</span></a></span></span><span>                </span><span class="hs-comment">-- A foreign procedure</span><span>
</span><span id="line-302"></span><span>        </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span>                  </span><span class="hs-comment">-- Its address</span><span>
</span><span id="line-303"></span><span>        </span><span class="annot"><a href="GHC.Cmm.Node.html#ForeignConvention"><span class="hs-identifier hs-type">ForeignConvention</span></a></span><span>        </span><span class="hs-comment">-- Its calling convention</span><span>
</span><span id="line-304"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="PrimTarget"><span class="annot"><a href="GHC.Cmm.Node.html#PrimTarget"><span class="hs-identifier hs-var">PrimTarget</span></a></span></span><span>            </span><span class="hs-comment">-- A possibly-side-effecting machine operation</span><span>
</span><span id="line-305"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#CallishMachOp"><span class="hs-identifier hs-type">CallishMachOp</span></a></span><span>            </span><span class="hs-comment">-- Which one</span><span>
</span><span id="line-306"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span id="local-6989586621680935214"><span id="local-6989586621680935220"><span class="annot"><span class="annottext">ForeignTarget -&gt; ForeignTarget -&gt; Bool
(ForeignTarget -&gt; ForeignTarget -&gt; Bool)
-&gt; (ForeignTarget -&gt; ForeignTarget -&gt; Bool) -&gt; Eq ForeignTarget
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: ForeignTarget -&gt; ForeignTarget -&gt; Bool
$c/= :: ForeignTarget -&gt; ForeignTarget -&gt; Bool
== :: ForeignTarget -&gt; ForeignTarget -&gt; Bool
$c== :: ForeignTarget -&gt; ForeignTarget -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span>
</span><span id="line-307"></span><span>
</span><span id="line-308"></span><span class="annot"><a href="GHC.Cmm.Node.html#foreignTargetHints"><span class="hs-identifier hs-type">foreignTargetHints</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier hs-type">ForeignTarget</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Type.html#ForeignHint"><span class="hs-identifier hs-type">ForeignHint</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Type.html#ForeignHint"><span class="hs-identifier hs-type">ForeignHint</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-309"></span><span id="foreignTargetHints"><span class="annot"><span class="annottext">foreignTargetHints :: ForeignTarget -&gt; ([ForeignHint], [ForeignHint])
</span><a href="GHC.Cmm.Node.html#foreignTargetHints"><span class="hs-identifier hs-var hs-var">foreignTargetHints</span></a></span></span><span> </span><span id="local-6989586621680935213"><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680935213"><span class="hs-identifier hs-var">target</span></a></span></span><span>
</span><span id="line-310"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">[ForeignHint]
</span><a href="#local-6989586621680935212"><span class="hs-identifier hs-var">res_hints</span></a></span><span> </span><span class="annot"><span class="annottext">[ForeignHint] -&gt; [ForeignHint] -&gt; [ForeignHint]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignHint -&gt; [ForeignHint]
forall a. a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#repeat"><span class="hs-identifier hs-var">repeat</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignHint
</span><a href="GHC.Cmm.Type.html#NoHint"><span class="hs-identifier hs-var">NoHint</span></a></span><span>
</span><span id="line-311"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[ForeignHint]
</span><a href="#local-6989586621680935209"><span class="hs-identifier hs-var">arg_hints</span></a></span><span> </span><span class="annot"><span class="annottext">[ForeignHint] -&gt; [ForeignHint] -&gt; [ForeignHint]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignHint -&gt; [ForeignHint]
forall a. a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#repeat"><span class="hs-identifier hs-var">repeat</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignHint
</span><a href="GHC.Cmm.Type.html#NoHint"><span class="hs-identifier hs-var">NoHint</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-312"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-313"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680935212"><span class="annot"><span class="annottext">[ForeignHint]
</span><a href="#local-6989586621680935212"><span class="hs-identifier hs-var">res_hints</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680935209"><span class="annot"><span class="annottext">[ForeignHint]
</span><a href="#local-6989586621680935209"><span class="hs-identifier hs-var">arg_hints</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-314"></span><span>       </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680935213"><span class="hs-identifier hs-var">target</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-315"></span><span>          </span><span class="annot"><a href="GHC.Cmm.Node.html#PrimTarget"><span class="hs-identifier hs-type">PrimTarget</span></a></span><span> </span><span id="local-6989586621680935208"><span class="annot"><span class="annottext">CallishMachOp
</span><a href="#local-6989586621680935208"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CallishMachOp -&gt; ([ForeignHint], [ForeignHint])
</span><a href="GHC.Cmm.MachOp.html#callishMachOpHints"><span class="hs-identifier hs-var">callishMachOpHints</span></a></span><span> </span><span class="annot"><span class="annottext">CallishMachOp
</span><a href="#local-6989586621680935208"><span class="hs-identifier hs-var">op</span></a></span><span>
</span><span id="line-316"></span><span>          </span><span class="annot"><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier hs-type">ForeignTarget</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#ForeignConvention"><span class="hs-identifier hs-type">ForeignConvention</span></a></span><span> </span><span class="annot"><span class="annottext">CCallConv
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680935206"><span class="annot"><span class="annottext">[ForeignHint]
</span><a href="#local-6989586621680935206"><span class="hs-identifier hs-var">arg_hints</span></a></span></span><span> </span><span id="local-6989586621680935205"><span class="annot"><span class="annottext">[ForeignHint]
</span><a href="#local-6989586621680935205"><span class="hs-identifier hs-var">res_hints</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmReturnInfo
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-317"></span><span>             </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[ForeignHint]
</span><a href="#local-6989586621680935205"><span class="hs-identifier hs-var">res_hints</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[ForeignHint]
</span><a href="#local-6989586621680935206"><span class="hs-identifier hs-var">arg_hints</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-318"></span><span>
</span><span id="line-319"></span><span class="hs-comment">--------------------------------------------------</span><span>
</span><span id="line-320"></span><span class="hs-comment">-- Instances of register and slot users / definers</span><span>
</span><span id="line-321"></span><span>
</span><span id="line-322"></span><span id="local-6989586621680935644"><span id="local-6989586621680935645"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#UserOfRegs"><span class="hs-identifier hs-type">UserOfRegs</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#LocalReg"><span class="hs-identifier hs-type">LocalReg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935645"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935644"><span class="hs-identifier hs-type">x</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-323"></span><span>  </span><span id="local-6989586621680935198"><span class="annot"><span class="annottext">foldRegsUsed :: forall b.
DynFlags -&gt; (b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; CmmNode e x -&gt; b
</span><a href="GHC.Cmm.Expr.html#foldRegsUsed"><span class="hs-identifier hs-var hs-var hs-var hs-var">foldRegsUsed</span></a></span></span><span> </span><span id="local-6989586621680935196"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680935196"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680935195"><span class="annot"><span class="annottext">b -&gt; CmmFormal -&gt; b
</span><a href="#local-6989586621680935195"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680935194"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935194"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621680935193"><span class="annot"><span class="annottext">CmmNode e x
</span><a href="#local-6989586621680935193"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">CmmNode e x
</span><a href="#local-6989586621680935193"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-324"></span><span>    </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmAssign"><span class="hs-identifier hs-type">CmmAssign</span></a></span><span> </span><span class="annot"><span class="annottext">CmmReg
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680935185"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935185"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; CmmExpr -&gt; b
forall a b.
UserOfRegs CmmFormal a =&gt;
(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935184"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; CmmFormal -&gt; b
</span><a href="#local-6989586621680935195"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935194"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935185"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-325"></span><span>    </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmStore"><span class="hs-identifier hs-type">CmmStore</span></a></span><span> </span><span id="local-6989586621680935177"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935177"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span id="local-6989586621680935176"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935176"><span class="hs-identifier hs-var">rval</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; CmmExpr -&gt; b
forall a b.
UserOfRegs CmmFormal a =&gt;
(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935184"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; CmmFormal -&gt; b
</span><a href="#local-6989586621680935195"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; CmmExpr -&gt; b
forall a b.
UserOfRegs CmmFormal a =&gt;
(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935184"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; CmmFormal -&gt; b
</span><a href="#local-6989586621680935195"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935194"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935177"><span class="hs-identifier hs-var">addr</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935176"><span class="hs-identifier hs-var">rval</span></a></span><span>
</span><span id="line-326"></span><span>    </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmUnsafeForeignCall"><span class="hs-identifier hs-type">CmmUnsafeForeignCall</span></a></span><span> </span><span id="local-6989586621680935166"><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680935166"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="annot"><span class="annottext">[CmmFormal]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680935165"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680935165"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; [CmmExpr] -&gt; b
forall a b.
UserOfRegs CmmFormal a =&gt;
(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935184"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; CmmFormal -&gt; b
</span><a href="#local-6989586621680935195"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; ForeignTarget -&gt; b
forall a b.
UserOfRegs CmmFormal a =&gt;
(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935184"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; CmmFormal -&gt; b
</span><a href="#local-6989586621680935195"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935194"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680935166"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680935165"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-327"></span><span>    </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmCondBranch"><span class="hs-identifier hs-type">CmmCondBranch</span></a></span><span> </span><span id="local-6989586621680935159"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935159"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span class="annot"><span class="annottext">Label
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Label
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Maybe Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; CmmExpr -&gt; b
forall a b.
UserOfRegs CmmFormal a =&gt;
(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935184"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; CmmFormal -&gt; b
</span><a href="#local-6989586621680935195"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935194"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935159"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-328"></span><span>    </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmSwitch"><span class="hs-identifier hs-type">CmmSwitch</span></a></span><span> </span><span id="local-6989586621680935153"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935153"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span class="annot"><span class="annottext">SwitchTargets
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; CmmExpr -&gt; b
forall a b.
UserOfRegs CmmFormal a =&gt;
(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935184"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; CmmFormal -&gt; b
</span><a href="#local-6989586621680935195"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935194"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935153"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-329"></span><span>    </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmCall"><span class="hs-identifier hs-type">CmmCall</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">cml_target :: CmmNode 'Open 'Closed -&gt; CmmExpr
</span><a href="GHC.Cmm.Node.html#cml_target"><span class="hs-identifier hs-var">cml_target</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621680935147"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935147"><span class="hs-identifier hs-var">tgt</span></a></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; CmmExpr -&gt; b
forall a b.
UserOfRegs CmmFormal a =&gt;
(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935184"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; CmmFormal -&gt; b
</span><a href="#local-6989586621680935195"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935194"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935147"><span class="hs-identifier hs-var">tgt</span></a></span><span>
</span><span id="line-330"></span><span>    </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmForeignCall"><span class="hs-identifier hs-type">CmmForeignCall</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">tgt :: CmmNode 'Open 'Closed -&gt; ForeignTarget
</span><a href="GHC.Cmm.Node.html#tgt"><span class="hs-identifier hs-var">tgt</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621680935139"><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680935139"><span class="hs-identifier hs-var">tgt</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">args :: CmmNode 'Open 'Closed -&gt; [CmmExpr]
</span><a href="GHC.Cmm.Node.html#args"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621680935138"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680935138"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; [CmmExpr] -&gt; b
forall a b.
UserOfRegs CmmFormal a =&gt;
(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935184"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; CmmFormal -&gt; b
</span><a href="#local-6989586621680935195"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; ForeignTarget -&gt; b
forall a b.
UserOfRegs CmmFormal a =&gt;
(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935184"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; CmmFormal -&gt; b
</span><a href="#local-6989586621680935195"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935194"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680935139"><span class="hs-identifier hs-var">tgt</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680935138"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-331"></span><span>    </span><span class="annot"><span class="annottext">CmmNode e x
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935194"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-332"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span class="annot"><a href="#local-6989586621680935184"><span class="hs-identifier hs-type">fold</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621680935641"><span class="annot"><a href="#local-6989586621680935641"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span id="local-6989586621680935640"><span class="annot"><a href="#local-6989586621680935640"><span class="hs-identifier hs-type">b</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#UserOfRegs"><span class="hs-identifier hs-type">UserOfRegs</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#LocalReg"><span class="hs-identifier hs-type">LocalReg</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935641"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-333"></span><span>               </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680935640"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#LocalReg"><span class="hs-identifier hs-type">LocalReg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935640"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935640"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935641"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935640"><span class="hs-identifier hs-type">b</span></a></span><span>
</span><span id="line-334"></span><span>          </span><span id="local-6989586621680935184"><span class="annot"><span class="annottext">fold :: forall a b.
UserOfRegs CmmFormal a =&gt;
(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935184"><span class="hs-identifier hs-var hs-var">fold</span></a></span></span><span> </span><span id="local-6989586621680935135"><span class="annot"><span class="annottext">b -&gt; CmmFormal -&gt; b
</span><a href="#local-6989586621680935135"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621680935134"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935134"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621680935133"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680935133"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; a -&gt; b
forall r a b.
UserOfRegs r a =&gt;
DynFlags -&gt; (b -&gt; r -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="GHC.Cmm.Expr.html#foldRegsUsed"><span class="hs-identifier hs-var">foldRegsUsed</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680935196"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; CmmFormal -&gt; b
</span><a href="#local-6989586621680935135"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935134"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680935133"><span class="hs-identifier hs-var">n</span></a></span></span></span><span>
</span><span id="line-335"></span><span>
</span><span id="line-336"></span><span id="local-6989586621680935631"><span id="local-6989586621680935632"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#UserOfRegs"><span class="hs-identifier hs-type">UserOfRegs</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#GlobalReg"><span class="hs-identifier hs-type">GlobalReg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935632"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935631"><span class="hs-identifier hs-type">x</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-337"></span><span>  </span><span id="local-6989586621680935127"><span class="annot"><span class="annottext">foldRegsUsed :: forall b.
DynFlags -&gt; (b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; CmmNode e x -&gt; b
</span><a href="#local-6989586621680935127"><span class="hs-identifier hs-var hs-var hs-var hs-var">foldRegsUsed</span></a></span></span><span> </span><span id="local-6989586621680935126"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680935126"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680935125"><span class="annot"><span class="annottext">b -&gt; GlobalReg -&gt; b
</span><a href="#local-6989586621680935125"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680935124"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935124"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621680935123"><span class="annot"><span class="annottext">CmmNode e x
</span><a href="#local-6989586621680935123"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">CmmNode e x
</span><a href="#local-6989586621680935123"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-338"></span><span>    </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmAssign"><span class="hs-identifier hs-type">CmmAssign</span></a></span><span> </span><span class="annot"><span class="annottext">CmmReg
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680935116"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935116"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; CmmExpr -&gt; b
forall a b.
UserOfRegs GlobalReg a =&gt;
(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935115"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; GlobalReg -&gt; b
</span><a href="#local-6989586621680935125"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935124"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935116"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-339"></span><span>    </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmStore"><span class="hs-identifier hs-type">CmmStore</span></a></span><span> </span><span id="local-6989586621680935108"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935108"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span id="local-6989586621680935107"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935107"><span class="hs-identifier hs-var">rval</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; CmmExpr -&gt; b
forall a b.
UserOfRegs GlobalReg a =&gt;
(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935115"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; GlobalReg -&gt; b
</span><a href="#local-6989586621680935125"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; CmmExpr -&gt; b
forall a b.
UserOfRegs GlobalReg a =&gt;
(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935115"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; GlobalReg -&gt; b
</span><a href="#local-6989586621680935125"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935124"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935108"><span class="hs-identifier hs-var">addr</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935107"><span class="hs-identifier hs-var">rval</span></a></span><span>
</span><span id="line-340"></span><span>    </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmUnsafeForeignCall"><span class="hs-identifier hs-type">CmmUnsafeForeignCall</span></a></span><span> </span><span id="local-6989586621680935099"><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680935099"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="annot"><span class="annottext">[CmmFormal]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680935098"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680935098"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; [CmmExpr] -&gt; b
forall a b.
UserOfRegs GlobalReg a =&gt;
(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935115"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; GlobalReg -&gt; b
</span><a href="#local-6989586621680935125"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; ForeignTarget -&gt; b
forall a b.
UserOfRegs GlobalReg a =&gt;
(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935115"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; GlobalReg -&gt; b
</span><a href="#local-6989586621680935125"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935124"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680935099"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680935098"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-341"></span><span>    </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmCondBranch"><span class="hs-identifier hs-type">CmmCondBranch</span></a></span><span> </span><span id="local-6989586621680935092"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935092"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span class="annot"><span class="annottext">Label
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Label
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Maybe Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; CmmExpr -&gt; b
forall a b.
UserOfRegs GlobalReg a =&gt;
(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935115"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; GlobalReg -&gt; b
</span><a href="#local-6989586621680935125"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935124"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935092"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-342"></span><span>    </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmSwitch"><span class="hs-identifier hs-type">CmmSwitch</span></a></span><span> </span><span id="local-6989586621680935086"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935086"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span class="annot"><span class="annottext">SwitchTargets
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; CmmExpr -&gt; b
forall a b.
UserOfRegs GlobalReg a =&gt;
(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935115"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; GlobalReg -&gt; b
</span><a href="#local-6989586621680935125"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935124"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935086"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-343"></span><span>    </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmCall"><span class="hs-identifier hs-type">CmmCall</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">cml_target :: CmmNode 'Open 'Closed -&gt; CmmExpr
</span><a href="GHC.Cmm.Node.html#cml_target"><span class="hs-identifier hs-var">cml_target</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621680935077"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935077"><span class="hs-identifier hs-var">tgt</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cml_args_regs :: CmmNode 'Open 'Closed -&gt; [GlobalReg]
</span><a href="GHC.Cmm.Node.html#cml_args_regs"><span class="hs-identifier hs-var">cml_args_regs</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621680935076"><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621680935076"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; CmmExpr -&gt; b
forall a b.
UserOfRegs GlobalReg a =&gt;
(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935115"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; GlobalReg -&gt; b
</span><a href="#local-6989586621680935125"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; [GlobalReg] -&gt; b
forall a b.
UserOfRegs GlobalReg a =&gt;
(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935115"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; GlobalReg -&gt; b
</span><a href="#local-6989586621680935125"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935124"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621680935076"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935077"><span class="hs-identifier hs-var">tgt</span></a></span><span>
</span><span id="line-344"></span><span>    </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmForeignCall"><span class="hs-identifier hs-type">CmmForeignCall</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">tgt :: CmmNode 'Open 'Closed -&gt; ForeignTarget
</span><a href="GHC.Cmm.Node.html#tgt"><span class="hs-identifier hs-var">tgt</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621680935068"><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680935068"><span class="hs-identifier hs-var">tgt</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">args :: CmmNode 'Open 'Closed -&gt; [CmmExpr]
</span><a href="GHC.Cmm.Node.html#args"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621680935067"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680935067"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; [CmmExpr] -&gt; b
forall a b.
UserOfRegs GlobalReg a =&gt;
(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935115"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; GlobalReg -&gt; b
</span><a href="#local-6989586621680935125"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; ForeignTarget -&gt; b
forall a b.
UserOfRegs GlobalReg a =&gt;
(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935115"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; GlobalReg -&gt; b
</span><a href="#local-6989586621680935125"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935124"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680935068"><span class="hs-identifier hs-var">tgt</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680935067"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-345"></span><span>    </span><span class="annot"><span class="annottext">CmmNode e x
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935124"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-346"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span class="annot"><a href="#local-6989586621680935115"><span class="hs-identifier hs-type">fold</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621680935629"><span class="annot"><a href="#local-6989586621680935629"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span id="local-6989586621680935628"><span class="annot"><a href="#local-6989586621680935628"><span class="hs-identifier hs-type">b</span></a></span></span><span class="hs-operator">.</span><span>  </span><span class="annot"><a href="GHC.Cmm.Expr.html#UserOfRegs"><span class="hs-identifier hs-type">UserOfRegs</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#GlobalReg"><span class="hs-identifier hs-type">GlobalReg</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935629"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-347"></span><span>               </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680935628"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#GlobalReg"><span class="hs-identifier hs-type">GlobalReg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935628"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935628"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935629"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935628"><span class="hs-identifier hs-type">b</span></a></span><span>
</span><span id="line-348"></span><span>          </span><span id="local-6989586621680935115"><span class="annot"><span class="annottext">fold :: forall a b.
UserOfRegs GlobalReg a =&gt;
(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935115"><span class="hs-identifier hs-var hs-var">fold</span></a></span></span><span> </span><span id="local-6989586621680935064"><span class="annot"><span class="annottext">b -&gt; GlobalReg -&gt; b
</span><a href="#local-6989586621680935064"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621680935063"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935063"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621680935062"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680935062"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; a -&gt; b
forall r a b.
UserOfRegs r a =&gt;
DynFlags -&gt; (b -&gt; r -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="GHC.Cmm.Expr.html#foldRegsUsed"><span class="hs-identifier hs-var">foldRegsUsed</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680935126"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; GlobalReg -&gt; b
</span><a href="#local-6989586621680935064"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935063"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680935062"><span class="hs-identifier hs-var">n</span></a></span></span></span><span>
</span><span id="line-349"></span><span>
</span><span id="line-350"></span><span id="local-6989586621680935637"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="#local-6989586621680935637"><span class="hs-identifier hs-type">r</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#UserOfRegs"><span class="hs-identifier hs-type">UserOfRegs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935637"><span class="hs-identifier hs-type">r</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmReg"><span class="hs-identifier hs-type">CmmReg</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#UserOfRegs"><span class="hs-identifier hs-type">UserOfRegs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935637"><span class="hs-identifier hs-type">r</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier hs-type">ForeignTarget</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-351"></span><span>  </span><span class="hs-comment">-- The (Ord r) in the context is necessary here</span><span>
</span><span id="line-352"></span><span>  </span><span class="hs-comment">-- See Note [Recursive superclasses] in GHC.Tc.TyCl.Instance</span><span>
</span><span id="line-353"></span><span>  </span><span id="local-6989586621680935055"><span class="annot"><span class="annottext">foldRegsUsed :: forall b. DynFlags -&gt; (b -&gt; r -&gt; b) -&gt; b -&gt; ForeignTarget -&gt; b
</span><a href="#local-6989586621680935055"><span class="hs-identifier hs-var hs-var hs-var hs-var">foldRegsUsed</span></a></span></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span>      </span><span class="annot"><span class="annottext">b -&gt; r -&gt; b
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680935054"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935054"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#PrimTarget"><span class="hs-identifier hs-type">PrimTarget</span></a></span><span> </span><span class="annot"><span class="annottext">CallishMachOp
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935054"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-354"></span><span>  </span><span class="annot"><a href="GHC.Cmm.Expr.html#foldRegsUsed"><span class="hs-identifier hs-var">foldRegsUsed</span></a></span><span> </span><span id="local-6989586621680935053"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680935053"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680935052"><span class="annot"><span class="annottext">b -&gt; r -&gt; b
</span><a href="#local-6989586621680935052"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680935051"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935051"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier hs-type">ForeignTarget</span></a></span><span> </span><span id="local-6989586621680935050"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935050"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="annot"><span class="annottext">ForeignConvention
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (b -&gt; r -&gt; b) -&gt; b -&gt; CmmExpr -&gt; b
forall r a b.
UserOfRegs r a =&gt;
DynFlags -&gt; (b -&gt; r -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="GHC.Cmm.Expr.html#foldRegsUsed"><span class="hs-identifier hs-var">foldRegsUsed</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680935053"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; r -&gt; b
</span><a href="#local-6989586621680935052"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935051"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680935050"><span class="hs-identifier hs-var">e</span></a></span></span><span>
</span><span id="line-355"></span><span>
</span><span id="line-356"></span><span id="local-6989586621680935615"><span id="local-6989586621680935616"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#DefinerOfRegs"><span class="hs-identifier hs-type">DefinerOfRegs</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#LocalReg"><span class="hs-identifier hs-type">LocalReg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935616"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935615"><span class="hs-identifier hs-type">x</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-357"></span><span>  </span><span id="local-6989586621680935044"><span class="annot"><span class="annottext">foldRegsDefd :: forall b.
DynFlags -&gt; (b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; CmmNode e x -&gt; b
</span><a href="GHC.Cmm.Expr.html#foldRegsDefd"><span class="hs-identifier hs-var hs-var hs-var hs-var">foldRegsDefd</span></a></span></span><span> </span><span id="local-6989586621680935042"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680935042"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680935041"><span class="annot"><span class="annottext">b -&gt; CmmFormal -&gt; b
</span><a href="#local-6989586621680935041"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680935040"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935040"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621680935039"><span class="annot"><span class="annottext">CmmNode e x
</span><a href="#local-6989586621680935039"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">CmmNode e x
</span><a href="#local-6989586621680935039"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-358"></span><span>    </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmAssign"><span class="hs-identifier hs-type">CmmAssign</span></a></span><span> </span><span id="local-6989586621680935034"><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621680935034"><span class="hs-identifier hs-var">lhs</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; CmmReg -&gt; b
forall a b.
DefinerOfRegs CmmFormal a =&gt;
(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935033"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; CmmFormal -&gt; b
</span><a href="#local-6989586621680935041"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935040"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621680935034"><span class="hs-identifier hs-var">lhs</span></a></span><span>
</span><span id="line-359"></span><span>    </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmUnsafeForeignCall"><span class="hs-identifier hs-type">CmmUnsafeForeignCall</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680935025"><span class="annot"><span class="annottext">[CmmFormal]
</span><a href="#local-6989586621680935025"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; [CmmFormal] -&gt; b
forall a b.
DefinerOfRegs CmmFormal a =&gt;
(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935033"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; CmmFormal -&gt; b
</span><a href="#local-6989586621680935041"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935040"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmFormal]
</span><a href="#local-6989586621680935025"><span class="hs-identifier hs-var">fs</span></a></span><span>
</span><span id="line-360"></span><span>    </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmForeignCall"><span class="hs-identifier hs-type">CmmForeignCall</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">res :: CmmNode 'Open 'Closed -&gt; [CmmFormal]
</span><a href="GHC.Cmm.Node.html#res"><span class="hs-identifier hs-var">res</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621680935019"><span class="annot"><span class="annottext">[CmmFormal]
</span><a href="#local-6989586621680935019"><span class="hs-identifier hs-var">res</span></a></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; [CmmFormal] -&gt; b
forall a b.
DefinerOfRegs CmmFormal a =&gt;
(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935033"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; CmmFormal -&gt; b
</span><a href="#local-6989586621680935041"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935040"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmFormal]
</span><a href="#local-6989586621680935019"><span class="hs-identifier hs-var">res</span></a></span><span>
</span><span id="line-361"></span><span>    </span><span class="annot"><span class="annottext">CmmNode e x
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935040"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-362"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span class="annot"><a href="#local-6989586621680935033"><span class="hs-identifier hs-type">fold</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621680935613"><span class="annot"><a href="#local-6989586621680935613"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span id="local-6989586621680935612"><span class="annot"><a href="#local-6989586621680935612"><span class="hs-identifier hs-type">b</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#DefinerOfRegs"><span class="hs-identifier hs-type">DefinerOfRegs</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#LocalReg"><span class="hs-identifier hs-type">LocalReg</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935613"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-363"></span><span>               </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680935612"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#LocalReg"><span class="hs-identifier hs-type">LocalReg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935612"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935612"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935613"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935612"><span class="hs-identifier hs-type">b</span></a></span><span>
</span><span id="line-364"></span><span>          </span><span id="local-6989586621680935033"><span class="annot"><span class="annottext">fold :: forall a b.
DefinerOfRegs CmmFormal a =&gt;
(b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680935033"><span class="hs-identifier hs-var hs-var">fold</span></a></span></span><span> </span><span id="local-6989586621680935016"><span class="annot"><span class="annottext">b -&gt; CmmFormal -&gt; b
</span><a href="#local-6989586621680935016"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621680935015"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935015"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621680935014"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680935014"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (b -&gt; CmmFormal -&gt; b) -&gt; b -&gt; a -&gt; b
forall r a b.
DefinerOfRegs r a =&gt;
DynFlags -&gt; (b -&gt; r -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="GHC.Cmm.Expr.html#foldRegsDefd"><span class="hs-identifier hs-var">foldRegsDefd</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680935042"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; CmmFormal -&gt; b
</span><a href="#local-6989586621680935016"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935015"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680935014"><span class="hs-identifier hs-var">n</span></a></span></span></span><span>
</span><span id="line-365"></span><span>
</span><span id="line-366"></span><span id="local-6989586621680935603"><span id="local-6989586621680935604"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#DefinerOfRegs"><span class="hs-identifier hs-type">DefinerOfRegs</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#GlobalReg"><span class="hs-identifier hs-type">GlobalReg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935604"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935603"><span class="hs-identifier hs-type">x</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-367"></span><span>  </span><span id="local-6989586621680935009"><span class="annot"><span class="annottext">foldRegsDefd :: forall b.
DynFlags -&gt; (b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; CmmNode e x -&gt; b
</span><a href="#local-6989586621680935009"><span class="hs-identifier hs-var hs-var hs-var hs-var">foldRegsDefd</span></a></span></span><span> </span><span id="local-6989586621680935008"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680935008"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680935007"><span class="annot"><span class="annottext">b -&gt; GlobalReg -&gt; b
</span><a href="#local-6989586621680935007"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680935006"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935006"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621680935005"><span class="annot"><span class="annottext">CmmNode e x
</span><a href="#local-6989586621680935005"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">CmmNode e x
</span><a href="#local-6989586621680935005"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-368"></span><span>    </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmAssign"><span class="hs-identifier hs-type">CmmAssign</span></a></span><span> </span><span id="local-6989586621680935000"><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621680935000"><span class="hs-identifier hs-var">lhs</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; CmmReg -&gt; b
forall a b.
DefinerOfRegs GlobalReg a =&gt;
(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680934999"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; GlobalReg -&gt; b
</span><a href="#local-6989586621680935007"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935006"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621680935000"><span class="hs-identifier hs-var">lhs</span></a></span><span>
</span><span id="line-369"></span><span>    </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmUnsafeForeignCall"><span class="hs-identifier hs-type">CmmUnsafeForeignCall</span></a></span><span> </span><span id="local-6989586621680934993"><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680934993"><span class="hs-identifier hs-var">tgt</span></a></span></span><span> </span><span class="annot"><span class="annottext">[CmmFormal]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; [GlobalReg] -&gt; b
forall a b.
DefinerOfRegs GlobalReg a =&gt;
(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680934999"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; GlobalReg -&gt; b
</span><a href="#local-6989586621680935007"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935006"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ForeignTarget -&gt; [GlobalReg]
</span><a href="#local-6989586621680934992"><span class="hs-identifier hs-var">foreignTargetRegs</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680934993"><span class="hs-identifier hs-var">tgt</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-370"></span><span>    </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmCall"><span class="hs-identifier hs-type">CmmCall</span></a></span><span>        </span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; [GlobalReg] -&gt; b
forall a b.
DefinerOfRegs GlobalReg a =&gt;
(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680934999"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; GlobalReg -&gt; b
</span><a href="#local-6989586621680935007"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935006"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621680934986"><span class="hs-identifier hs-var">activeRegs</span></a></span><span>
</span><span id="line-371"></span><span>    </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmForeignCall"><span class="hs-identifier hs-type">CmmForeignCall</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; [GlobalReg] -&gt; b
forall a b.
DefinerOfRegs GlobalReg a =&gt;
(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680934999"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; GlobalReg -&gt; b
</span><a href="#local-6989586621680935007"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935006"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621680934986"><span class="hs-identifier hs-var">activeRegs</span></a></span><span>
</span><span id="line-372"></span><span>                      </span><span class="hs-comment">-- See Note [Safe foreign calls clobber STG registers]</span><span>
</span><span id="line-373"></span><span>    </span><span class="annot"><span class="annottext">CmmNode e x
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680935006"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-374"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span class="annot"><a href="#local-6989586621680934999"><span class="hs-identifier hs-type">fold</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621680935601"><span class="annot"><a href="#local-6989586621680935601"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span id="local-6989586621680935600"><span class="annot"><a href="#local-6989586621680935600"><span class="hs-identifier hs-type">b</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#DefinerOfRegs"><span class="hs-identifier hs-type">DefinerOfRegs</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#GlobalReg"><span class="hs-identifier hs-type">GlobalReg</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935601"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-375"></span><span>               </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680935600"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#GlobalReg"><span class="hs-identifier hs-type">GlobalReg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935600"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935600"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935601"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935600"><span class="hs-identifier hs-type">b</span></a></span><span>
</span><span id="line-376"></span><span>          </span><span id="local-6989586621680934999"><span class="annot"><span class="annottext">fold :: forall a b.
DefinerOfRegs GlobalReg a =&gt;
(b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="#local-6989586621680934999"><span class="hs-identifier hs-var hs-var">fold</span></a></span></span><span> </span><span id="local-6989586621680934978"><span class="annot"><span class="annottext">b -&gt; GlobalReg -&gt; b
</span><a href="#local-6989586621680934978"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621680934977"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680934977"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621680934976"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680934976"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (b -&gt; GlobalReg -&gt; b) -&gt; b -&gt; a -&gt; b
forall r a b.
DefinerOfRegs r a =&gt;
DynFlags -&gt; (b -&gt; r -&gt; b) -&gt; b -&gt; a -&gt; b
</span><a href="GHC.Cmm.Expr.html#foldRegsDefd"><span class="hs-identifier hs-var">foldRegsDefd</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680935008"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; GlobalReg -&gt; b
</span><a href="#local-6989586621680934978"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680934977"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680934976"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-377"></span><span>
</span><span id="line-378"></span><span>          </span><span id="local-6989586621680934975"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621680934975"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680935008"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-379"></span><span>          </span><span id="local-6989586621680934986"><span class="annot"><span class="annottext">activeRegs :: [GlobalReg]
</span><a href="#local-6989586621680934986"><span class="hs-identifier hs-var hs-var">activeRegs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; [GlobalReg]
</span><a href="GHC.Platform.Regs.html#activeStgRegs"><span class="hs-identifier hs-var">activeStgRegs</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680934975"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-380"></span><span>          </span><span id="local-6989586621680934972"><span class="annot"><span class="annottext">activeCallerSavesRegs :: [GlobalReg]
</span><a href="#local-6989586621680934972"><span class="hs-identifier hs-var hs-var">activeCallerSavesRegs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(GlobalReg -&gt; Bool) -&gt; [GlobalReg] -&gt; [GlobalReg]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; GlobalReg -&gt; Bool
</span><a href="GHC.Platform.Regs.html#callerSaves"><span class="hs-identifier hs-var">callerSaves</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680934975"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621680934986"><span class="hs-identifier hs-var">activeRegs</span></a></span><span>
</span><span id="line-381"></span><span>
</span><span id="line-382"></span><span>          </span><span id="local-6989586621680934992"><span class="annot"><span class="annottext">foreignTargetRegs :: ForeignTarget -&gt; [GlobalReg]
</span><a href="#local-6989586621680934992"><span class="hs-identifier hs-var hs-var">foreignTargetRegs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier hs-type">ForeignTarget</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#ForeignConvention"><span class="hs-identifier hs-type">ForeignConvention</span></a></span><span> </span><span class="annot"><span class="annottext">CCallConv
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[ForeignHint]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[ForeignHint]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">CmmReturnInfo
</span><a href="GHC.Cmm.Node.html#CmmNeverReturns"><span class="hs-identifier hs-var">CmmNeverReturns</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-383"></span><span>          </span><span class="annot"><a href="#local-6989586621680934992"><span class="hs-identifier hs-var">foreignTargetRegs</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621680934972"><span class="hs-identifier hs-var">activeCallerSavesRegs</span></a></span></span></span><span>
</span><span id="line-384"></span><span>
</span><span id="line-385"></span><span class="hs-comment">-- Note [Safe foreign calls clobber STG registers]</span><span>
</span><span id="line-386"></span><span class="hs-comment">-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><span>
</span><span id="line-387"></span><span class="hs-comment">--</span><span>
</span><span id="line-388"></span><span class="hs-comment">-- During stack layout phase every safe foreign call is expanded into a block</span><span>
</span><span id="line-389"></span><span class="hs-comment">-- that contains unsafe foreign call (instead of safe foreign call) and ends</span><span>
</span><span id="line-390"></span><span class="hs-comment">-- with a normal call (See Note [Foreign calls]). This means that we must</span><span>
</span><span id="line-391"></span><span class="hs-comment">-- treat safe foreign call as if it was a normal call (because eventually it</span><span>
</span><span id="line-392"></span><span class="hs-comment">-- will be). This is important if we try to run sinking pass before stack</span><span>
</span><span id="line-393"></span><span class="hs-comment">-- layout phase. Consider this example of what might go wrong (this is cmm</span><span>
</span><span id="line-394"></span><span class="hs-comment">-- code from stablename001 test). Here is code after common block elimination</span><span>
</span><span id="line-395"></span><span class="hs-comment">-- (before stack layout):</span><span>
</span><span id="line-396"></span><span class="hs-comment">--</span><span>
</span><span id="line-397"></span><span class="hs-comment">--  c1q6:</span><span>
</span><span id="line-398"></span><span class="hs-comment">--      _s1pf::P64 = R1;</span><span>
</span><span id="line-399"></span><span class="hs-comment">--      _c1q8::I64 = performMajorGC;</span><span>
</span><span id="line-400"></span><span class="hs-comment">--      I64[(young&lt;c1q9&gt; + 8)] = c1q9;</span><span>
</span><span id="line-401"></span><span class="hs-comment">--      foreign call &quot;ccall&quot; arg hints:  []  result hints:  [] (_c1q8::I64)(...)</span><span>
</span><span id="line-402"></span><span class="hs-comment">--                   returns to c1q9 args: ([]) ress: ([])ret_args: 8ret_off: 8;</span><span>
</span><span id="line-403"></span><span class="hs-comment">--  c1q9:</span><span>
</span><span id="line-404"></span><span class="hs-comment">--      I64[(young&lt;c1qb&gt; + 8)] = c1qb;</span><span>
</span><span id="line-405"></span><span class="hs-comment">--      R1 = _s1pc::P64;</span><span>
</span><span id="line-406"></span><span class="hs-comment">--      call stg_makeStableName#(R1) returns to c1qb, args: 8, res: 8, upd: 8;</span><span>
</span><span id="line-407"></span><span class="hs-comment">--</span><span>
</span><span id="line-408"></span><span class="hs-comment">-- If we run sinking pass now (still before stack layout) we will get this:</span><span>
</span><span id="line-409"></span><span class="hs-comment">--</span><span>
</span><span id="line-410"></span><span class="hs-comment">--  c1q6:</span><span>
</span><span id="line-411"></span><span class="hs-comment">--      I64[(young&lt;c1q9&gt; + 8)] = c1q9;</span><span>
</span><span id="line-412"></span><span class="hs-comment">--      foreign call &quot;ccall&quot; arg hints:  []  result hints:  [] performMajorGC(...)</span><span>
</span><span id="line-413"></span><span class="hs-comment">--                   returns to c1q9 args: ([]) ress: ([])ret_args: 8ret_off: 8;</span><span>
</span><span id="line-414"></span><span class="hs-comment">--  c1q9:</span><span>
</span><span id="line-415"></span><span class="hs-comment">--      I64[(young&lt;c1qb&gt; + 8)] = c1qb;</span><span>
</span><span id="line-416"></span><span class="hs-comment">--      _s1pf::P64 = R1;         &lt;------ _s1pf sunk past safe foreign call</span><span>
</span><span id="line-417"></span><span class="hs-comment">--      R1 = _s1pc::P64;</span><span>
</span><span id="line-418"></span><span class="hs-comment">--      call stg_makeStableName#(R1) returns to c1qb, args: 8, res: 8, upd: 8;</span><span>
</span><span id="line-419"></span><span class="hs-comment">--</span><span>
</span><span id="line-420"></span><span class="hs-comment">-- Notice that _s1pf was sunk past a foreign call. When we run stack layout</span><span>
</span><span id="line-421"></span><span class="hs-comment">-- safe call to performMajorGC will be turned into:</span><span>
</span><span id="line-422"></span><span class="hs-comment">--</span><span>
</span><span id="line-423"></span><span class="hs-comment">--  c1q6:</span><span>
</span><span id="line-424"></span><span class="hs-comment">--      _s1pc::P64 = P64[Sp + 8];</span><span>
</span><span id="line-425"></span><span class="hs-comment">--      I64[Sp - 8] = c1q9;</span><span>
</span><span id="line-426"></span><span class="hs-comment">--      Sp = Sp - 8;</span><span>
</span><span id="line-427"></span><span class="hs-comment">--      I64[I64[CurrentTSO + 24] + 16] = Sp;</span><span>
</span><span id="line-428"></span><span class="hs-comment">--      P64[CurrentNursery + 8] = Hp + 8;</span><span>
</span><span id="line-429"></span><span class="hs-comment">--      (_u1qI::I64) = call &quot;ccall&quot; arg hints:  [PtrHint,]</span><span>
</span><span id="line-430"></span><span class="hs-comment">--                           result hints:  [PtrHint] suspendThread(BaseReg, 0);</span><span>
</span><span id="line-431"></span><span class="hs-comment">--      call &quot;ccall&quot; arg hints:  []  result hints:  [] performMajorGC();</span><span>
</span><span id="line-432"></span><span class="hs-comment">--      (_u1qJ::I64) = call &quot;ccall&quot; arg hints:  [PtrHint]</span><span>
</span><span id="line-433"></span><span class="hs-comment">--                           result hints:  [PtrHint] resumeThread(_u1qI::I64);</span><span>
</span><span id="line-434"></span><span class="hs-comment">--      BaseReg = _u1qJ::I64;</span><span>
</span><span id="line-435"></span><span class="hs-comment">--      _u1qK::P64 = CurrentTSO;</span><span>
</span><span id="line-436"></span><span class="hs-comment">--      _u1qL::P64 = I64[_u1qK::P64 + 24];</span><span>
</span><span id="line-437"></span><span class="hs-comment">--      Sp = I64[_u1qL::P64 + 16];</span><span>
</span><span id="line-438"></span><span class="hs-comment">--      SpLim = _u1qL::P64 + 192;</span><span>
</span><span id="line-439"></span><span class="hs-comment">--      HpAlloc = 0;</span><span>
</span><span id="line-440"></span><span class="hs-comment">--      Hp = I64[CurrentNursery + 8] - 8;</span><span>
</span><span id="line-441"></span><span class="hs-comment">--      HpLim = I64[CurrentNursery] + (%MO_SS_Conv_W32_W64(I32[CurrentNursery + 48]) * 4096 - 1);</span><span>
</span><span id="line-442"></span><span class="hs-comment">--      call (I64[Sp])() returns to c1q9, args: 8, res: 8, upd: 8;</span><span>
</span><span id="line-443"></span><span class="hs-comment">--  c1q9:</span><span>
</span><span id="line-444"></span><span class="hs-comment">--      I64[(young&lt;c1qb&gt; + 8)] = c1qb;</span><span>
</span><span id="line-445"></span><span class="hs-comment">--      _s1pf::P64 = R1;         &lt;------ INCORRECT!</span><span>
</span><span id="line-446"></span><span class="hs-comment">--      R1 = _s1pc::P64;</span><span>
</span><span id="line-447"></span><span class="hs-comment">--      call stg_makeStableName#(R1) returns to c1qb, args: 8, res: 8, upd: 8;</span><span>
</span><span id="line-448"></span><span class="hs-comment">--</span><span>
</span><span id="line-449"></span><span class="hs-comment">-- Notice that c1q6 now ends with a call. Sinking _s1pf::P64 = R1 past that</span><span>
</span><span id="line-450"></span><span class="hs-comment">-- call is clearly incorrect. This is what would happen if we assumed that</span><span>
</span><span id="line-451"></span><span class="hs-comment">-- safe foreign call has the same semantics as unsafe foreign call. To prevent</span><span>
</span><span id="line-452"></span><span class="hs-comment">-- this we need to treat safe foreign call as if was normal call.</span><span>
</span><span id="line-453"></span><span>
</span><span id="line-454"></span><span class="hs-comment">-----------------------------------</span><span>
</span><span id="line-455"></span><span class="hs-comment">-- mapping Expr in GHC.Cmm.Node</span><span>
</span><span id="line-456"></span><span>
</span><span id="line-457"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapForeignTarget"><span class="hs-identifier hs-type">mapForeignTarget</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier hs-type">ForeignTarget</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier hs-type">ForeignTarget</span></a></span><span>
</span><span id="line-458"></span><span id="mapForeignTarget"><span class="annot"><span class="annottext">mapForeignTarget :: (CmmExpr -&gt; CmmExpr) -&gt; ForeignTarget -&gt; ForeignTarget
</span><a href="GHC.Cmm.Node.html#mapForeignTarget"><span class="hs-identifier hs-var hs-var">mapForeignTarget</span></a></span></span><span> </span><span id="local-6989586621680934969"><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934969"><span class="hs-identifier hs-var">exp</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier hs-type">ForeignTarget</span></a></span><span> </span><span id="local-6989586621680934968"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934968"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621680934967"><span class="annot"><span class="annottext">ForeignConvention
</span><a href="#local-6989586621680934967"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; ForeignConvention -&gt; ForeignTarget
</span><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier hs-var">ForeignTarget</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934969"><span class="hs-identifier hs-var">exp</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934968"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ForeignConvention
</span><a href="#local-6989586621680934967"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-459"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapForeignTarget"><span class="hs-identifier hs-var">mapForeignTarget</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><span class="hs-identifier">_</span></span><span>   </span><span id="local-6989586621680934966"><span class="annot"><span class="annottext">m :: ForeignTarget
</span><a href="#local-6989586621680934966"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#PrimTarget"><span class="hs-identifier hs-type">PrimTarget</span></a></span><span> </span><span class="annot"><span class="annottext">CallishMachOp
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680934966"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-460"></span><span>
</span><span id="line-461"></span><span class="annot"><a href="GHC.Cmm.Node.html#wrapRecExp"><span class="hs-identifier hs-type">wrapRecExp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span>
</span><span id="line-462"></span><span class="hs-comment">-- Take a transformer on expressions and apply it recursively.</span><span>
</span><span id="line-463"></span><span class="hs-comment">-- (wrapRecExp f e) first recursively applies itself to sub-expressions of e</span><span>
</span><span id="line-464"></span><span class="hs-comment">--                  then  uses f to rewrite the resulting expression</span><span>
</span><span id="line-465"></span><span id="wrapRecExp"><span class="annot"><span class="annottext">wrapRecExp :: (CmmExpr -&gt; CmmExpr) -&gt; CmmExpr -&gt; CmmExpr
</span><a href="GHC.Cmm.Node.html#wrapRecExp"><span class="hs-identifier hs-var hs-var">wrapRecExp</span></a></span></span><span> </span><span id="local-6989586621680934965"><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934965"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmMachOp"><span class="hs-identifier hs-type">CmmMachOp</span></a></span><span> </span><span id="local-6989586621680934963"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621680934963"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span id="local-6989586621680934962"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934962"><span class="hs-identifier hs-var">es</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934965"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmMachOp"><span class="hs-identifier hs-var">CmmMachOp</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621680934963"><span class="hs-identifier hs-var">op</span></a></span><span> </span><span class="annot"><span class="annottext">([CmmExpr] -&gt; CmmExpr) -&gt; [CmmExpr] -&gt; CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmExpr) -&gt; [CmmExpr] -&gt; [CmmExpr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmExpr) -&gt; CmmExpr -&gt; CmmExpr
</span><a href="GHC.Cmm.Node.html#wrapRecExp"><span class="hs-identifier hs-var">wrapRecExp</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934965"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934962"><span class="hs-identifier hs-var">es</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-466"></span><span class="annot"><a href="GHC.Cmm.Node.html#wrapRecExp"><span class="hs-identifier hs-var">wrapRecExp</span></a></span><span> </span><span id="local-6989586621680934961"><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934961"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLoad"><span class="hs-identifier hs-type">CmmLoad</span></a></span><span> </span><span id="local-6989586621680934959"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934959"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span id="local-6989586621680934958"><span class="annot"><span class="annottext">CmmType
</span><a href="#local-6989586621680934958"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934961"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmType -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLoad"><span class="hs-identifier hs-var">CmmLoad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmExpr) -&gt; CmmExpr -&gt; CmmExpr
</span><a href="GHC.Cmm.Node.html#wrapRecExp"><span class="hs-identifier hs-var">wrapRecExp</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934961"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934959"><span class="hs-identifier hs-var">addr</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CmmType
</span><a href="#local-6989586621680934958"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-467"></span><span class="annot"><a href="GHC.Cmm.Node.html#wrapRecExp"><span class="hs-identifier hs-var">wrapRecExp</span></a></span><span> </span><span id="local-6989586621680934957"><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934957"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621680934956"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934956"><span class="hs-identifier hs-var">e</span></a></span></span><span>                    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934957"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934956"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-468"></span><span>
</span><span id="line-469"></span><span id="local-6989586621680935587"><span id="local-6989586621680935588"><span class="annot"><a href="GHC.Cmm.Node.html#mapExp"><span class="hs-identifier hs-type">mapExp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935588"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935587"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935588"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935587"><span class="hs-identifier hs-type">x</span></a></span></span></span><span>
</span><span id="line-470"></span><span id="mapExp"><span class="annot"><span class="annottext">mapExp :: forall (e :: Extensibility) (x :: Extensibility).
(CmmExpr -&gt; CmmExpr) -&gt; CmmNode e x -&gt; CmmNode e x
</span><a href="GHC.Cmm.Node.html#mapExp"><span class="hs-identifier hs-var hs-var">mapExp</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680934955"><span class="annot"><span class="annottext">f :: CmmNode e x
</span><a href="#local-6989586621680934955"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmEntry"><span class="hs-identifier hs-type">CmmEntry</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>                          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmNode e x
</span><a href="#local-6989586621680934955"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-471"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExp"><span class="hs-identifier hs-var">mapExp</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680934952"><span class="annot"><span class="annottext">m :: CmmNode e x
</span><a href="#local-6989586621680934952"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmComment"><span class="hs-identifier hs-type">CmmComment</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>                        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmNode e x
</span><a href="#local-6989586621680934952"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-472"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExp"><span class="hs-identifier hs-var">mapExp</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680934949"><span class="annot"><span class="annottext">m :: CmmNode e x
</span><a href="#local-6989586621680934949"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTick"><span class="hs-identifier hs-type">CmmTick</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickish
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>                           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmNode e x
</span><a href="#local-6989586621680934949"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-473"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExp"><span class="hs-identifier hs-var">mapExp</span></a></span><span> </span><span id="local-6989586621680934946"><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934946"><span class="hs-identifier hs-var">f</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmUnwind"><span class="hs-identifier hs-type">CmmUnwind</span></a></span><span> </span><span id="local-6989586621680934940"><span class="annot"><span class="annottext">[(GlobalReg, Maybe CmmExpr)]
</span><a href="#local-6989586621680934940"><span class="hs-identifier hs-var">regs</span></a></span></span><span class="hs-special">)</span><span>                      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(GlobalReg, Maybe CmmExpr)] -&gt; CmmNode 'Open 'Open
</span><a href="GHC.Cmm.Node.html#CmmUnwind"><span class="hs-identifier hs-var">CmmUnwind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((GlobalReg, Maybe CmmExpr) -&gt; (GlobalReg, Maybe CmmExpr))
-&gt; [(GlobalReg, Maybe CmmExpr)] -&gt; [(GlobalReg, Maybe CmmExpr)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Maybe CmmExpr -&gt; Maybe CmmExpr)
-&gt; (GlobalReg, Maybe CmmExpr) -&gt; (GlobalReg, Maybe CmmExpr)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmExpr) -&gt; Maybe CmmExpr -&gt; Maybe CmmExpr
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934946"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(GlobalReg, Maybe CmmExpr)]
</span><a href="#local-6989586621680934940"><span class="hs-identifier hs-var">regs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-474"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExp"><span class="hs-identifier hs-var">mapExp</span></a></span><span> </span><span id="local-6989586621680934939"><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934939"><span class="hs-identifier hs-var">f</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmAssign"><span class="hs-identifier hs-type">CmmAssign</span></a></span><span> </span><span id="local-6989586621680934936"><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621680934936"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621680934935"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934935"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span>                       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmReg -&gt; CmmExpr -&gt; CmmNode 'Open 'Open
</span><a href="GHC.Cmm.Node.html#CmmAssign"><span class="hs-identifier hs-var">CmmAssign</span></a></span><span> </span><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621680934936"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934939"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934935"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-475"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExp"><span class="hs-identifier hs-var">mapExp</span></a></span><span> </span><span id="local-6989586621680934934"><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934934"><span class="hs-identifier hs-var">f</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmStore"><span class="hs-identifier hs-type">CmmStore</span></a></span><span> </span><span id="local-6989586621680934931"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934931"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span id="local-6989586621680934930"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934930"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span>                     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr -&gt; CmmNode 'Open 'Open
</span><a href="GHC.Cmm.Node.html#CmmStore"><span class="hs-identifier hs-var">CmmStore</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934934"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934931"><span class="hs-identifier hs-var">addr</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934934"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934930"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-476"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExp"><span class="hs-identifier hs-var">mapExp</span></a></span><span> </span><span id="local-6989586621680934929"><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934929"><span class="hs-identifier hs-var">f</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmUnsafeForeignCall"><span class="hs-identifier hs-type">CmmUnsafeForeignCall</span></a></span><span> </span><span id="local-6989586621680934926"><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680934926"><span class="hs-identifier hs-var">tgt</span></a></span></span><span> </span><span id="local-6989586621680934925"><span class="annot"><span class="annottext">[CmmFormal]
</span><a href="#local-6989586621680934925"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span id="local-6989586621680934924"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934924"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ForeignTarget -&gt; [CmmFormal] -&gt; [CmmExpr] -&gt; CmmNode 'Open 'Open
</span><a href="GHC.Cmm.Node.html#CmmUnsafeForeignCall"><span class="hs-identifier hs-var">CmmUnsafeForeignCall</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmExpr) -&gt; ForeignTarget -&gt; ForeignTarget
</span><a href="GHC.Cmm.Node.html#mapForeignTarget"><span class="hs-identifier hs-var">mapForeignTarget</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934929"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680934926"><span class="hs-identifier hs-var">tgt</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[CmmFormal]
</span><a href="#local-6989586621680934925"><span class="hs-identifier hs-var">fs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmExpr) -&gt; [CmmExpr] -&gt; [CmmExpr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934929"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934924"><span class="hs-keyword hs-var">as</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-477"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExp"><span class="hs-identifier hs-var">mapExp</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680934923"><span class="annot"><span class="annottext">l :: CmmNode e x
</span><a href="#local-6989586621680934923"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmBranch"><span class="hs-identifier hs-type">CmmBranch</span></a></span><span> </span><span class="annot"><span class="annottext">Label
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>                         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmNode e x
</span><a href="#local-6989586621680934923"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-478"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExp"><span class="hs-identifier hs-var">mapExp</span></a></span><span> </span><span id="local-6989586621680934920"><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934920"><span class="hs-identifier hs-var">f</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmCondBranch"><span class="hs-identifier hs-type">CmmCondBranch</span></a></span><span> </span><span id="local-6989586621680934917"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934917"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621680934916"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934916"><span class="hs-identifier hs-var">ti</span></a></span></span><span> </span><span id="local-6989586621680934915"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934915"><span class="hs-identifier hs-var">fi</span></a></span></span><span> </span><span id="local-6989586621680934914"><span class="annot"><span class="annottext">Maybe Bool
</span><a href="#local-6989586621680934914"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">)</span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Label -&gt; Label -&gt; Maybe Bool -&gt; CmmNode 'Open 'Closed
</span><a href="GHC.Cmm.Node.html#CmmCondBranch"><span class="hs-identifier hs-var">CmmCondBranch</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934920"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934917"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934916"><span class="hs-identifier hs-var">ti</span></a></span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934915"><span class="hs-identifier hs-var">fi</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Bool
</span><a href="#local-6989586621680934914"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-479"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExp"><span class="hs-identifier hs-var">mapExp</span></a></span><span> </span><span id="local-6989586621680934913"><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934913"><span class="hs-identifier hs-var">f</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmSwitch"><span class="hs-identifier hs-type">CmmSwitch</span></a></span><span> </span><span id="local-6989586621680934910"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934910"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621680934909"><span class="annot"><span class="annottext">SwitchTargets
</span><a href="#local-6989586621680934909"><span class="hs-identifier hs-var">ids</span></a></span></span><span class="hs-special">)</span><span>                     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; SwitchTargets -&gt; CmmNode 'Open 'Closed
</span><a href="GHC.Cmm.Node.html#CmmSwitch"><span class="hs-identifier hs-var">CmmSwitch</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934913"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934910"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SwitchTargets
</span><a href="#local-6989586621680934909"><span class="hs-identifier hs-var">ids</span></a></span><span>
</span><span id="line-480"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExp"><span class="hs-identifier hs-var">mapExp</span></a></span><span> </span><span id="local-6989586621680934908"><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934908"><span class="hs-identifier hs-var">f</span></a></span></span><span>   </span><span id="local-6989586621680934907"><span class="annot"><span class="annottext">n :: CmmNode e x
</span><a href="#local-6989586621680934907"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmCall"><span class="hs-identifier hs-type">CmmCall</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">cml_target :: CmmNode 'Open 'Closed -&gt; CmmExpr
</span><a href="GHC.Cmm.Node.html#cml_target"><span class="hs-identifier hs-var">cml_target</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621680934904"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934904"><span class="hs-identifier hs-var">tgt</span></a></span></span><span class="hs-special">}</span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmNode e x
</span><a href="#local-6989586621680934907"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">{</span><span class="annot"><span class="annottext">cml_target :: CmmExpr
</span><a href="GHC.Cmm.Node.html#cml_target"><span class="hs-identifier hs-var">cml_target</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934908"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934904"><span class="hs-identifier hs-var">tgt</span></a></span><span class="hs-special">}</span><span>
</span><span id="line-481"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExp"><span class="hs-identifier hs-var">mapExp</span></a></span><span> </span><span id="local-6989586621680934903"><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934903"><span class="hs-identifier hs-var">f</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmForeignCall"><span class="hs-identifier hs-type">CmmForeignCall</span></a></span><span> </span><span id="local-6989586621680934900"><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680934900"><span class="hs-identifier hs-var">tgt</span></a></span></span><span> </span><span id="local-6989586621680934899"><span class="annot"><span class="annottext">[CmmFormal]
</span><a href="#local-6989586621680934899"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span id="local-6989586621680934898"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934898"><span class="hs-keyword hs-var">as</span></a></span></span><span> </span><span id="local-6989586621680934897"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934897"><span class="hs-identifier hs-var">succ</span></a></span></span><span> </span><span id="local-6989586621680934896"><span class="annot"><span class="annottext">ByteOff
</span><a href="#local-6989586621680934896"><span class="hs-identifier hs-var">ret_args</span></a></span></span><span> </span><span id="local-6989586621680934895"><span class="annot"><span class="annottext">ByteOff
</span><a href="#local-6989586621680934895"><span class="hs-identifier hs-var">updfr</span></a></span></span><span> </span><span id="local-6989586621680934894"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680934894"><span class="hs-identifier hs-var">intrbl</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ForeignTarget
-&gt; [CmmFormal]
-&gt; [CmmExpr]
-&gt; Label
-&gt; ByteOff
-&gt; ByteOff
-&gt; Bool
-&gt; CmmNode 'Open 'Closed
</span><a href="GHC.Cmm.Node.html#CmmForeignCall"><span class="hs-identifier hs-var">CmmForeignCall</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmExpr) -&gt; ForeignTarget -&gt; ForeignTarget
</span><a href="GHC.Cmm.Node.html#mapForeignTarget"><span class="hs-identifier hs-var">mapForeignTarget</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934903"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680934900"><span class="hs-identifier hs-var">tgt</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[CmmFormal]
</span><a href="#local-6989586621680934899"><span class="hs-identifier hs-var">fs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmExpr) -&gt; [CmmExpr] -&gt; [CmmExpr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934903"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934898"><span class="hs-keyword hs-var">as</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934897"><span class="hs-identifier hs-var">succ</span></a></span><span> </span><span class="annot"><span class="annottext">ByteOff
</span><a href="#local-6989586621680934896"><span class="hs-identifier hs-var">ret_args</span></a></span><span> </span><span class="annot"><span class="annottext">ByteOff
</span><a href="#local-6989586621680934895"><span class="hs-identifier hs-var">updfr</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680934894"><span class="hs-identifier hs-var">intrbl</span></a></span><span>
</span><span id="line-482"></span><span>
</span><span id="line-483"></span><span id="local-6989586621680934892"><span id="local-6989586621680934893"><span class="annot"><a href="GHC.Cmm.Node.html#mapExpDeep"><span class="hs-identifier hs-type">mapExpDeep</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680934893"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680934892"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680934893"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680934892"><span class="hs-identifier hs-type">x</span></a></span></span></span><span>
</span><span id="line-484"></span><span id="mapExpDeep"><span class="annot"><span class="annottext">mapExpDeep :: forall (e :: Extensibility) (x :: Extensibility).
(CmmExpr -&gt; CmmExpr) -&gt; CmmNode e x -&gt; CmmNode e x
</span><a href="GHC.Cmm.Node.html#mapExpDeep"><span class="hs-identifier hs-var hs-var">mapExpDeep</span></a></span></span><span> </span><span id="local-6989586621680934891"><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934891"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmExpr) -&gt; CmmNode e x -&gt; CmmNode e x
forall (e :: Extensibility) (x :: Extensibility).
(CmmExpr -&gt; CmmExpr) -&gt; CmmNode e x -&gt; CmmNode e x
</span><a href="GHC.Cmm.Node.html#mapExp"><span class="hs-identifier hs-var">mapExp</span></a></span><span> </span><span class="annot"><span class="annottext">((CmmExpr -&gt; CmmExpr) -&gt; CmmNode e x -&gt; CmmNode e x)
-&gt; (CmmExpr -&gt; CmmExpr) -&gt; CmmNode e x -&gt; CmmNode e x
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmExpr) -&gt; CmmExpr -&gt; CmmExpr
</span><a href="GHC.Cmm.Node.html#wrapRecExp"><span class="hs-identifier hs-var">wrapRecExp</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621680934891"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-485"></span><span>
</span><span id="line-486"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-487"></span><span class="hs-comment">-- mapping Expr in GHC.Cmm.Node, but not performing allocation if no changes</span><span>
</span><span id="line-488"></span><span>
</span><span id="line-489"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapForeignTargetM"><span class="hs-identifier hs-type">mapForeignTargetM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier hs-type">ForeignTarget</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier hs-type">ForeignTarget</span></a></span><span>
</span><span id="line-490"></span><span id="mapForeignTargetM"><span class="annot"><span class="annottext">mapForeignTargetM :: (CmmExpr -&gt; Maybe CmmExpr) -&gt; ForeignTarget -&gt; Maybe ForeignTarget
</span><a href="GHC.Cmm.Node.html#mapForeignTargetM"><span class="hs-identifier hs-var hs-var">mapForeignTargetM</span></a></span></span><span> </span><span id="local-6989586621680934889"><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934889"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier hs-type">ForeignTarget</span></a></span><span> </span><span id="local-6989586621680934888"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934888"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621680934887"><span class="annot"><span class="annottext">ForeignConvention
</span><a href="#local-6989586621680934887"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680934886"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934886"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; ForeignConvention -&gt; ForeignTarget
</span><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier hs-var">ForeignTarget</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934886"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignConvention
</span><a href="#local-6989586621680934887"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; ForeignTarget) -&gt; Maybe CmmExpr -&gt; Maybe ForeignTarget
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934889"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934888"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-491"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapForeignTargetM"><span class="hs-identifier hs-var">mapForeignTargetM</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#PrimTarget"><span class="hs-identifier hs-type">PrimTarget</span></a></span><span> </span><span class="annot"><span class="annottext">CallishMachOp
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe ForeignTarget
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-492"></span><span>
</span><span id="line-493"></span><span class="annot"><a href="GHC.Cmm.Node.html#wrapRecExpM"><span class="hs-identifier hs-type">wrapRecExpM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-494"></span><span class="hs-comment">-- (wrapRecExpM f e) first recursively applies itself to sub-expressions of e</span><span>
</span><span id="line-495"></span><span class="hs-comment">--                   then  gives f a chance to rewrite the resulting expression</span><span>
</span><span id="line-496"></span><span id="wrapRecExpM"><span class="annot"><span class="annottext">wrapRecExpM :: (CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
</span><a href="GHC.Cmm.Node.html#wrapRecExpM"><span class="hs-identifier hs-var hs-var">wrapRecExpM</span></a></span></span><span> </span><span id="local-6989586621680934885"><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934885"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621680934884"><span class="annot"><span class="annottext">n :: CmmExpr
</span><a href="#local-6989586621680934884"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmMachOp"><span class="hs-identifier hs-type">CmmMachOp</span></a></span><span> </span><span id="local-6989586621680934883"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621680934883"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span id="local-6989586621680934882"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934882"><span class="hs-identifier hs-var">es</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe CmmExpr
-&gt; ([CmmExpr] -&gt; Maybe CmmExpr) -&gt; Maybe [CmmExpr] -&gt; Maybe CmmExpr
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934885"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934884"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934885"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr)
-&gt; ([CmmExpr] -&gt; CmmExpr) -&gt; [CmmExpr] -&gt; Maybe CmmExpr
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmMachOp"><span class="hs-identifier hs-var">CmmMachOp</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621680934883"><span class="hs-identifier hs-var">op</span></a></span><span class="hs-special">)</span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; [CmmExpr] -&gt; Maybe [CmmExpr]
forall a. (a -&gt; Maybe a) -&gt; [a] -&gt; Maybe [a]
</span><a href="GHC.Cmm.Node.html#mapListM"><span class="hs-identifier hs-var">mapListM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
</span><a href="GHC.Cmm.Node.html#wrapRecExpM"><span class="hs-identifier hs-var">wrapRecExpM</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934885"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934882"><span class="hs-identifier hs-var">es</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-497"></span><span class="annot"><a href="GHC.Cmm.Node.html#wrapRecExpM"><span class="hs-identifier hs-var">wrapRecExpM</span></a></span><span> </span><span id="local-6989586621680934878"><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934878"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621680934877"><span class="annot"><span class="annottext">n :: CmmExpr
</span><a href="#local-6989586621680934877"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLoad"><span class="hs-identifier hs-type">CmmLoad</span></a></span><span> </span><span id="local-6989586621680934876"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934876"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span id="local-6989586621680934875"><span class="annot"><span class="annottext">CmmType
</span><a href="#local-6989586621680934875"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe CmmExpr
-&gt; (CmmExpr -&gt; Maybe CmmExpr) -&gt; Maybe CmmExpr -&gt; Maybe CmmExpr
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934878"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934877"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934878"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr)
-&gt; (CmmExpr -&gt; CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmType -&gt; CmmExpr) -&gt; CmmType -&gt; CmmExpr -&gt; CmmExpr
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmType -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLoad"><span class="hs-identifier hs-var">CmmLoad</span></a></span><span> </span><span class="annot"><span class="annottext">CmmType
</span><a href="#local-6989586621680934875"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
</span><a href="GHC.Cmm.Node.html#wrapRecExpM"><span class="hs-identifier hs-var">wrapRecExpM</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934878"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934876"><span class="hs-identifier hs-var">addr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-498"></span><span class="annot"><a href="GHC.Cmm.Node.html#wrapRecExpM"><span class="hs-identifier hs-var">wrapRecExpM</span></a></span><span> </span><span id="local-6989586621680934873"><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934873"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621680934872"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934872"><span class="hs-identifier hs-var">e</span></a></span></span><span>                    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934873"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934872"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-499"></span><span>
</span><span id="line-500"></span><span id="local-6989586621680935568"><span id="local-6989586621680935569"><span class="annot"><a href="GHC.Cmm.Node.html#mapExpM"><span class="hs-identifier hs-type">mapExpM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935569"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935568"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935569"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935568"><span class="hs-identifier hs-type">x</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-501"></span><span id="mapExpM"><span class="annot"><span class="annottext">mapExpM :: forall (e :: Extensibility) (x :: Extensibility).
(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmNode e x -&gt; Maybe (CmmNode e x)
</span><a href="GHC.Cmm.Node.html#mapExpM"><span class="hs-identifier hs-var hs-var">mapExpM</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmEntry"><span class="hs-identifier hs-type">CmmEntry</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (CmmNode e x)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-502"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExpM"><span class="hs-identifier hs-var">mapExpM</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmComment"><span class="hs-identifier hs-type">CmmComment</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (CmmNode e x)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-503"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExpM"><span class="hs-identifier hs-var">mapExpM</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTick"><span class="hs-identifier hs-type">CmmTick</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickish
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (CmmNode e x)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-504"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExpM"><span class="hs-identifier hs-var">mapExpM</span></a></span><span> </span><span id="local-6989586621680934865"><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934865"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmUnwind"><span class="hs-identifier hs-type">CmmUnwind</span></a></span><span> </span><span id="local-6989586621680934851"><span class="annot"><span class="annottext">[(GlobalReg, Maybe CmmExpr)]
</span><a href="#local-6989586621680934851"><span class="hs-identifier hs-var">regs</span></a></span></span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(GlobalReg, Maybe CmmExpr)] -&gt; CmmNode 'Open 'Open
</span><a href="GHC.Cmm.Node.html#CmmUnwind"><span class="hs-identifier hs-var">CmmUnwind</span></a></span><span> </span><span class="annot"><span class="annottext">([(GlobalReg, Maybe CmmExpr)] -&gt; CmmNode 'Open 'Open)
-&gt; Maybe [(GlobalReg, Maybe CmmExpr)]
-&gt; Maybe (CmmNode 'Open 'Open)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span> </span><span class="annot"><span class="annottext">((GlobalReg, Maybe CmmExpr) -&gt; Maybe (GlobalReg, Maybe CmmExpr))
-&gt; [(GlobalReg, Maybe CmmExpr)]
-&gt; Maybe [(GlobalReg, Maybe CmmExpr)]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621680934849"><span class="annot"><span class="annottext">GlobalReg
</span><a href="#local-6989586621680934849"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680934848"><span class="annot"><span class="annottext">Maybe CmmExpr
</span><a href="#local-6989586621680934848"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr)
-&gt; Maybe CmmExpr -&gt; Maybe (Maybe CmmExpr)
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934865"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe CmmExpr
</span><a href="#local-6989586621680934848"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (Maybe CmmExpr)
-&gt; (Maybe CmmExpr -&gt; Maybe (GlobalReg, Maybe CmmExpr))
-&gt; Maybe (GlobalReg, Maybe CmmExpr)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680934847"><span class="annot"><span class="annottext">Maybe CmmExpr
</span><a href="#local-6989586621680934847"><span class="hs-identifier hs-var">e'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(GlobalReg, Maybe CmmExpr) -&gt; Maybe (GlobalReg, Maybe CmmExpr)
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GlobalReg
</span><a href="#local-6989586621680934849"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Maybe CmmExpr
</span><a href="#local-6989586621680934847"><span class="hs-identifier hs-var">e'</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(GlobalReg, Maybe CmmExpr)]
</span><a href="#local-6989586621680934851"><span class="hs-identifier hs-var">regs</span></a></span><span>
</span><span id="line-505"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExpM"><span class="hs-identifier hs-var">mapExpM</span></a></span><span> </span><span id="local-6989586621680934846"><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934846"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmAssign"><span class="hs-identifier hs-type">CmmAssign</span></a></span><span> </span><span id="local-6989586621680934842"><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621680934842"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621680934841"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934841"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmReg -&gt; CmmExpr -&gt; CmmNode 'Open 'Open
</span><a href="GHC.Cmm.Node.html#CmmAssign"><span class="hs-identifier hs-var">CmmAssign</span></a></span><span> </span><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621680934842"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmNode 'Open 'Open)
-&gt; Maybe CmmExpr -&gt; Maybe (CmmNode 'Open 'Open)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934846"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934841"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-506"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExpM"><span class="hs-identifier hs-var">mapExpM</span></a></span><span> </span><span id="local-6989586621680934840"><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934840"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmStore"><span class="hs-identifier hs-type">CmmStore</span></a></span><span> </span><span id="local-6989586621680934836"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934836"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span id="local-6989586621680934835"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934835"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">[</span><span id="local-6989586621680934834"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934834"><span class="hs-identifier hs-var">addr'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680934833"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934833"><span class="hs-identifier hs-var">e'</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr -&gt; CmmNode 'Open 'Open
</span><a href="GHC.Cmm.Node.html#CmmStore"><span class="hs-identifier hs-var">CmmStore</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934834"><span class="hs-identifier hs-var">addr'</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934833"><span class="hs-identifier hs-var">e'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([CmmExpr] -&gt; CmmNode 'Open 'Open)
-&gt; Maybe [CmmExpr] -&gt; Maybe (CmmNode 'Open 'Open)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; [CmmExpr] -&gt; Maybe [CmmExpr]
forall a. (a -&gt; Maybe a) -&gt; [a] -&gt; Maybe [a]
</span><a href="GHC.Cmm.Node.html#mapListM"><span class="hs-identifier hs-var">mapListM</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934840"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934836"><span class="hs-identifier hs-var">addr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934835"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-507"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExpM"><span class="hs-identifier hs-var">mapExpM</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmBranch"><span class="hs-identifier hs-type">CmmBranch</span></a></span><span> </span><span class="annot"><span class="annottext">Label
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (CmmNode e x)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-508"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExpM"><span class="hs-identifier hs-var">mapExpM</span></a></span><span> </span><span id="local-6989586621680934830"><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934830"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmCondBranch"><span class="hs-identifier hs-type">CmmCondBranch</span></a></span><span> </span><span id="local-6989586621680934826"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934826"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621680934825"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934825"><span class="hs-identifier hs-var">ti</span></a></span></span><span> </span><span id="local-6989586621680934824"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934824"><span class="hs-identifier hs-var">fi</span></a></span></span><span> </span><span id="local-6989586621680934823"><span class="annot"><span class="annottext">Maybe Bool
</span><a href="#local-6989586621680934823"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680934822"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934822"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Label -&gt; Label -&gt; Maybe Bool -&gt; CmmNode 'Open 'Closed
</span><a href="GHC.Cmm.Node.html#CmmCondBranch"><span class="hs-identifier hs-var">CmmCondBranch</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934822"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934825"><span class="hs-identifier hs-var">ti</span></a></span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934824"><span class="hs-identifier hs-var">fi</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Bool
</span><a href="#local-6989586621680934823"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmNode 'Open 'Closed)
-&gt; Maybe CmmExpr -&gt; Maybe (CmmNode 'Open 'Closed)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934830"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934826"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-509"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExpM"><span class="hs-identifier hs-var">mapExpM</span></a></span><span> </span><span id="local-6989586621680934821"><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934821"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmSwitch"><span class="hs-identifier hs-type">CmmSwitch</span></a></span><span> </span><span id="local-6989586621680934817"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934817"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621680934816"><span class="annot"><span class="annottext">SwitchTargets
</span><a href="#local-6989586621680934816"><span class="hs-identifier hs-var">tbl</span></a></span></span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680934815"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934815"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; SwitchTargets -&gt; CmmNode 'Open 'Closed
</span><a href="GHC.Cmm.Node.html#CmmSwitch"><span class="hs-identifier hs-var">CmmSwitch</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934815"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">SwitchTargets
</span><a href="#local-6989586621680934816"><span class="hs-identifier hs-var">tbl</span></a></span><span class="hs-special">)</span><span>       </span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmNode 'Open 'Closed)
-&gt; Maybe CmmExpr -&gt; Maybe (CmmNode 'Open 'Closed)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934821"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934817"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-510"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExpM"><span class="hs-identifier hs-var">mapExpM</span></a></span><span> </span><span id="local-6989586621680934814"><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934814"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmCall"><span class="hs-identifier hs-type">CmmCall</span></a></span><span> </span><span id="local-6989586621680934810"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934810"><span class="hs-identifier hs-var">tgt</span></a></span></span><span> </span><span id="local-6989586621680934809"><span class="annot"><span class="annottext">Maybe Label
</span><a href="#local-6989586621680934809"><span class="hs-identifier hs-var">mb_id</span></a></span></span><span> </span><span id="local-6989586621680934808"><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621680934808"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621680934807"><span class="annot"><span class="annottext">ByteOff
</span><a href="#local-6989586621680934807"><span class="hs-identifier hs-var">o</span></a></span></span><span> </span><span id="local-6989586621680934806"><span class="annot"><span class="annottext">ByteOff
</span><a href="#local-6989586621680934806"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621680934805"><span class="annot"><span class="annottext">ByteOff
</span><a href="#local-6989586621680934805"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680934804"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934804"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr
-&gt; Maybe Label
-&gt; [GlobalReg]
-&gt; ByteOff
-&gt; ByteOff
-&gt; ByteOff
-&gt; CmmNode 'Open 'Closed
</span><a href="GHC.Cmm.Node.html#CmmCall"><span class="hs-identifier hs-var">CmmCall</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934804"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Label
</span><a href="#local-6989586621680934809"><span class="hs-identifier hs-var">mb_id</span></a></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621680934808"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">ByteOff
</span><a href="#local-6989586621680934807"><span class="hs-identifier hs-var">o</span></a></span><span> </span><span class="annot"><span class="annottext">ByteOff
</span><a href="#local-6989586621680934806"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">ByteOff
</span><a href="#local-6989586621680934805"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmNode 'Open 'Closed)
-&gt; Maybe CmmExpr -&gt; Maybe (CmmNode 'Open 'Closed)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934814"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934810"><span class="hs-identifier hs-var">tgt</span></a></span><span>
</span><span id="line-511"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExpM"><span class="hs-identifier hs-var">mapExpM</span></a></span><span> </span><span id="local-6989586621680934803"><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934803"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmUnsafeForeignCall"><span class="hs-identifier hs-type">CmmUnsafeForeignCall</span></a></span><span> </span><span id="local-6989586621680934799"><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680934799"><span class="hs-identifier hs-var">tgt</span></a></span></span><span> </span><span id="local-6989586621680934798"><span class="annot"><span class="annottext">[CmmFormal]
</span><a href="#local-6989586621680934798"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span id="local-6989586621680934797"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934797"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-512"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; ForeignTarget -&gt; Maybe ForeignTarget
</span><a href="GHC.Cmm.Node.html#mapForeignTargetM"><span class="hs-identifier hs-var">mapForeignTargetM</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934803"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680934799"><span class="hs-identifier hs-var">tgt</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-513"></span><span>        </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680934796"><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680934796"><span class="hs-identifier hs-var">tgt'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmNode 'Open 'Open -&gt; Maybe (CmmNode 'Open 'Open)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ForeignTarget -&gt; [CmmFormal] -&gt; [CmmExpr] -&gt; CmmNode 'Open 'Open
</span><a href="GHC.Cmm.Node.html#CmmUnsafeForeignCall"><span class="hs-identifier hs-var">CmmUnsafeForeignCall</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680934796"><span class="hs-identifier hs-var">tgt'</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmFormal]
</span><a href="#local-6989586621680934798"><span class="hs-identifier hs-var">fs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; [CmmExpr] -&gt; [CmmExpr]
forall a. (a -&gt; Maybe a) -&gt; [a] -&gt; [a]
</span><a href="GHC.Cmm.Node.html#mapListJ"><span class="hs-identifier hs-var">mapListJ</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934803"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934797"><span class="hs-keyword hs-var">as</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-514"></span><span>        </span><span class="annot"><span class="annottext">Maybe ForeignTarget
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680934794"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934794"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ForeignTarget -&gt; [CmmFormal] -&gt; [CmmExpr] -&gt; CmmNode 'Open 'Open
</span><a href="GHC.Cmm.Node.html#CmmUnsafeForeignCall"><span class="hs-identifier hs-var">CmmUnsafeForeignCall</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680934799"><span class="hs-identifier hs-var">tgt</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmFormal]
</span><a href="#local-6989586621680934798"><span class="hs-identifier hs-var">fs</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934794"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([CmmExpr] -&gt; CmmNode 'Open 'Open)
-&gt; Maybe [CmmExpr] -&gt; Maybe (CmmNode 'Open 'Open)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; [CmmExpr] -&gt; Maybe [CmmExpr]
forall a. (a -&gt; Maybe a) -&gt; [a] -&gt; Maybe [a]
</span><a href="GHC.Cmm.Node.html#mapListM"><span class="hs-identifier hs-var">mapListM</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934803"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934797"><span class="hs-keyword hs-var">as</span></a></span><span>
</span><span id="line-515"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapExpM"><span class="hs-identifier hs-var">mapExpM</span></a></span><span> </span><span id="local-6989586621680934793"><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934793"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmForeignCall"><span class="hs-identifier hs-type">CmmForeignCall</span></a></span><span> </span><span id="local-6989586621680934789"><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680934789"><span class="hs-identifier hs-var">tgt</span></a></span></span><span> </span><span id="local-6989586621680934788"><span class="annot"><span class="annottext">[CmmFormal]
</span><a href="#local-6989586621680934788"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span id="local-6989586621680934787"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934787"><span class="hs-keyword hs-var">as</span></a></span></span><span> </span><span id="local-6989586621680934786"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934786"><span class="hs-identifier hs-var">succ</span></a></span></span><span> </span><span id="local-6989586621680934785"><span class="annot"><span class="annottext">ByteOff
</span><a href="#local-6989586621680934785"><span class="hs-identifier hs-var">ret_args</span></a></span></span><span> </span><span id="local-6989586621680934784"><span class="annot"><span class="annottext">ByteOff
</span><a href="#local-6989586621680934784"><span class="hs-identifier hs-var">updfr</span></a></span></span><span> </span><span id="local-6989586621680934783"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680934783"><span class="hs-identifier hs-var">intrbl</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-516"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; ForeignTarget -&gt; Maybe ForeignTarget
</span><a href="GHC.Cmm.Node.html#mapForeignTargetM"><span class="hs-identifier hs-var">mapForeignTargetM</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934793"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680934789"><span class="hs-identifier hs-var">tgt</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-517"></span><span>        </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680934782"><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680934782"><span class="hs-identifier hs-var">tgt'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmNode 'Open 'Closed -&gt; Maybe (CmmNode 'Open 'Closed)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ForeignTarget
-&gt; [CmmFormal]
-&gt; [CmmExpr]
-&gt; Label
-&gt; ByteOff
-&gt; ByteOff
-&gt; Bool
-&gt; CmmNode 'Open 'Closed
</span><a href="GHC.Cmm.Node.html#CmmForeignCall"><span class="hs-identifier hs-var">CmmForeignCall</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680934782"><span class="hs-identifier hs-var">tgt'</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmFormal]
</span><a href="#local-6989586621680934788"><span class="hs-identifier hs-var">fs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; [CmmExpr] -&gt; [CmmExpr]
forall a. (a -&gt; Maybe a) -&gt; [a] -&gt; [a]
</span><a href="GHC.Cmm.Node.html#mapListJ"><span class="hs-identifier hs-var">mapListJ</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934793"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934787"><span class="hs-keyword hs-var">as</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934786"><span class="hs-identifier hs-var">succ</span></a></span><span> </span><span class="annot"><span class="annottext">ByteOff
</span><a href="#local-6989586621680934785"><span class="hs-identifier hs-var">ret_args</span></a></span><span> </span><span class="annot"><span class="annottext">ByteOff
</span><a href="#local-6989586621680934784"><span class="hs-identifier hs-var">updfr</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680934783"><span class="hs-identifier hs-var">intrbl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-518"></span><span>        </span><span class="annot"><span class="annottext">Maybe ForeignTarget
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680934781"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934781"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ForeignTarget
-&gt; [CmmFormal]
-&gt; [CmmExpr]
-&gt; Label
-&gt; ByteOff
-&gt; ByteOff
-&gt; Bool
-&gt; CmmNode 'Open 'Closed
</span><a href="GHC.Cmm.Node.html#CmmForeignCall"><span class="hs-identifier hs-var">CmmForeignCall</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680934789"><span class="hs-identifier hs-var">tgt</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmFormal]
</span><a href="#local-6989586621680934788"><span class="hs-identifier hs-var">fs</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934781"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934786"><span class="hs-identifier hs-var">succ</span></a></span><span> </span><span class="annot"><span class="annottext">ByteOff
</span><a href="#local-6989586621680934785"><span class="hs-identifier hs-var">ret_args</span></a></span><span> </span><span class="annot"><span class="annottext">ByteOff
</span><a href="#local-6989586621680934784"><span class="hs-identifier hs-var">updfr</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680934783"><span class="hs-identifier hs-var">intrbl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([CmmExpr] -&gt; CmmNode 'Open 'Closed)
-&gt; Maybe [CmmExpr] -&gt; Maybe (CmmNode 'Open 'Closed)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; [CmmExpr] -&gt; Maybe [CmmExpr]
forall a. (a -&gt; Maybe a) -&gt; [a] -&gt; Maybe [a]
</span><a href="GHC.Cmm.Node.html#mapListM"><span class="hs-identifier hs-var">mapListM</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934793"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934787"><span class="hs-keyword hs-var">as</span></a></span><span>
</span><span id="line-519"></span><span>
</span><span id="line-520"></span><span class="hs-comment">-- share as much as possible</span><span>
</span><span id="line-521"></span><span id="local-6989586621680935573"><span class="annot"><a href="GHC.Cmm.Node.html#mapListM"><span class="hs-identifier hs-type">mapListM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680935573"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935573"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680935573"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680935573"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-522"></span><span id="mapListM"><span class="annot"><span class="annottext">mapListM :: forall a. (a -&gt; Maybe a) -&gt; [a] -&gt; Maybe [a]
</span><a href="GHC.Cmm.Node.html#mapListM"><span class="hs-identifier hs-var hs-var">mapListM</span></a></span></span><span> </span><span id="local-6989586621680934780"><span class="annot"><span class="annottext">a -&gt; Maybe a
</span><a href="#local-6989586621680934780"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621680934779"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680934779"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680934778"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680934778"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680934777"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680934777"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Maybe a) -&gt; [a] -&gt; (Bool, [a])
forall a. (a -&gt; Maybe a) -&gt; [a] -&gt; (Bool, [a])
</span><a href="GHC.Cmm.Node.html#mapListT"><span class="hs-identifier hs-var">mapListT</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a
</span><a href="#local-6989586621680934780"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680934779"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-523"></span><span>                </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680934778"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; Maybe [a]
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680934777"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Maybe [a]
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-524"></span><span>
</span><span id="line-525"></span><span id="local-6989586621680935556"><span class="annot"><a href="GHC.Cmm.Node.html#mapListJ"><span class="hs-identifier hs-type">mapListJ</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680935556"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935556"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680935556"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680935556"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-526"></span><span id="mapListJ"><span class="annot"><span class="annottext">mapListJ :: forall a. (a -&gt; Maybe a) -&gt; [a] -&gt; [a]
</span><a href="GHC.Cmm.Node.html#mapListJ"><span class="hs-identifier hs-var hs-var">mapListJ</span></a></span></span><span> </span><span id="local-6989586621680934775"><span class="annot"><span class="annottext">a -&gt; Maybe a
</span><a href="#local-6989586621680934775"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621680934774"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680934774"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Bool, [a]) -&gt; [a]
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; Maybe a) -&gt; [a] -&gt; (Bool, [a])
forall a. (a -&gt; Maybe a) -&gt; [a] -&gt; (Bool, [a])
</span><a href="GHC.Cmm.Node.html#mapListT"><span class="hs-identifier hs-var">mapListT</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a
</span><a href="#local-6989586621680934775"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680934774"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-527"></span><span>
</span><span id="line-528"></span><span id="local-6989586621680935554"><span class="annot"><a href="GHC.Cmm.Node.html#mapListT"><span class="hs-identifier hs-type">mapListT</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680935554"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935554"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680935554"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680935554"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span><span>
</span><span id="line-529"></span><span id="mapListT"><span class="annot"><span class="annottext">mapListT :: forall a. (a -&gt; Maybe a) -&gt; [a] -&gt; (Bool, [a])
</span><a href="GHC.Cmm.Node.html#mapListT"><span class="hs-identifier hs-var hs-var">mapListT</span></a></span></span><span> </span><span id="local-6989586621680934771"><span class="annot"><span class="annottext">a -&gt; Maybe a
</span><a href="#local-6989586621680934771"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621680934770"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680934770"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(([a], a, Maybe a) -&gt; (Bool, [a]) -&gt; (Bool, [a]))
-&gt; (Bool, [a]) -&gt; [([a], a, Maybe a)] -&gt; (Bool, [a])
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">([a], a, Maybe a) -&gt; (Bool, [a]) -&gt; (Bool, [a])
forall {a}. ([a], a, Maybe a) -&gt; (Bool, [a]) -&gt; (Bool, [a])
</span><a href="#local-6989586621680934768"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[[a]] -&gt; [a] -&gt; [Maybe a] -&gt; [([a], a, Maybe a)]
forall a b c. [a] -&gt; [b] -&gt; [c] -&gt; [(a, b, c)]
</span><a href="../../base/src/GHC.List.html#zip3"><span class="hs-identifier hs-var">zip3</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a] -&gt; [[a]]
forall a. [a] -&gt; [[a]]
</span><a href="../../base/src/Data.OldList.html#tails"><span class="hs-identifier hs-var">tails</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680934770"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680934770"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; Maybe a) -&gt; [a] -&gt; [Maybe a]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a
</span><a href="#local-6989586621680934771"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680934770"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-530"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621680934768"><span class="annot"><span class="annottext">g :: ([a], a, Maybe a) -&gt; (Bool, [a]) -&gt; (Bool, [a])
</span><a href="#local-6989586621680934768"><span class="hs-identifier hs-var hs-var">g</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span>   </span><span id="local-6989586621680934766"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680934766"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680934765"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680934765"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680934766"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680934765"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-531"></span><span>          </span><span class="annot"><a href="#local-6989586621680934768"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span>   </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680934764"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680934764"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680934763"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680934763"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680934764"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680934763"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-532"></span><span>          </span><span class="annot"><a href="#local-6989586621680934768"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680934762"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680934762"><span class="hs-identifier hs-var">ys'</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680934762"><span class="hs-identifier hs-var">ys'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-533"></span><span>          </span><span class="annot"><a href="#local-6989586621680934768"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span>   </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680934761"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680934761"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680934760"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680934760"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680934761"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680934760"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-534"></span><span>
</span><span id="line-535"></span><span id="local-6989586621680934758"><span id="local-6989586621680934759"><span class="annot"><a href="GHC.Cmm.Node.html#mapExpDeepM"><span class="hs-identifier hs-type">mapExpDeepM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680934759"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680934758"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680934759"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680934758"><span class="hs-identifier hs-type">x</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-536"></span><span id="mapExpDeepM"><span class="annot"><span class="annottext">mapExpDeepM :: forall (e :: Extensibility) (x :: Extensibility).
(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmNode e x -&gt; Maybe (CmmNode e x)
</span><a href="GHC.Cmm.Node.html#mapExpDeepM"><span class="hs-identifier hs-var hs-var">mapExpDeepM</span></a></span></span><span> </span><span id="local-6989586621680934757"><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934757"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmNode e x -&gt; Maybe (CmmNode e x)
forall (e :: Extensibility) (x :: Extensibility).
(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmNode e x -&gt; Maybe (CmmNode e x)
</span><a href="GHC.Cmm.Node.html#mapExpM"><span class="hs-identifier hs-var">mapExpM</span></a></span><span> </span><span class="annot"><span class="annottext">((CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmNode e x -&gt; Maybe (CmmNode e x))
-&gt; (CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmNode e x -&gt; Maybe (CmmNode e x)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
</span><a href="GHC.Cmm.Node.html#wrapRecExpM"><span class="hs-identifier hs-var">wrapRecExpM</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="#local-6989586621680934757"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-537"></span><span>
</span><span id="line-538"></span><span class="hs-comment">-----------------------------------</span><span>
</span><span id="line-539"></span><span class="hs-comment">-- folding Expr in GHC.Cmm.Node</span><span>
</span><span id="line-540"></span><span>
</span><span id="line-541"></span><span id="local-6989586621680935539"><span class="annot"><a href="GHC.Cmm.Node.html#foldExpForeignTarget"><span class="hs-identifier hs-type">foldExpForeignTarget</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935539"><span class="hs-identifier hs-type">z</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935539"><span class="hs-identifier hs-type">z</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier hs-type">ForeignTarget</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935539"><span class="hs-identifier hs-type">z</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935539"><span class="hs-identifier hs-type">z</span></a></span></span><span>
</span><span id="line-542"></span><span id="foldExpForeignTarget"><span class="annot"><span class="annottext">foldExpForeignTarget :: forall z. (CmmExpr -&gt; z -&gt; z) -&gt; ForeignTarget -&gt; z -&gt; z
</span><a href="GHC.Cmm.Node.html#foldExpForeignTarget"><span class="hs-identifier hs-var hs-var">foldExpForeignTarget</span></a></span></span><span> </span><span id="local-6989586621680934755"><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934755"><span class="hs-identifier hs-var">exp</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier hs-type">ForeignTarget</span></a></span><span> </span><span id="local-6989586621680934754"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934754"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="annot"><span class="annottext">ForeignConvention
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680934753"><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934753"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934755"><span class="hs-identifier hs-var">exp</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934754"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934753"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-543"></span><span class="annot"><a href="GHC.Cmm.Node.html#foldExpForeignTarget"><span class="hs-identifier hs-var">foldExpForeignTarget</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#PrimTarget"><span class="hs-identifier hs-type">PrimTarget</span></a></span><span> </span><span class="annot"><span class="annottext">CallishMachOp
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>      </span><span id="local-6989586621680934752"><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934752"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934752"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-544"></span><span>
</span><span id="line-545"></span><span class="hs-comment">-- Take a folder on expressions and apply it recursively.</span><span>
</span><span id="line-546"></span><span class="hs-comment">-- Specifically (wrapRecExpf f e z) deals with CmmMachOp and CmmLoad</span><span>
</span><span id="line-547"></span><span class="hs-comment">-- itself, delegating all the other CmmExpr forms to 'f'.</span><span>
</span><span id="line-548"></span><span id="local-6989586621680935537"><span class="annot"><a href="GHC.Cmm.Node.html#wrapRecExpf"><span class="hs-identifier hs-type">wrapRecExpf</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935537"><span class="hs-identifier hs-type">z</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935537"><span class="hs-identifier hs-type">z</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935537"><span class="hs-identifier hs-type">z</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935537"><span class="hs-identifier hs-type">z</span></a></span></span><span>
</span><span id="line-549"></span><span id="wrapRecExpf"><span class="annot"><span class="annottext">wrapRecExpf :: forall z. (CmmExpr -&gt; z -&gt; z) -&gt; CmmExpr -&gt; z -&gt; z
</span><a href="GHC.Cmm.Node.html#wrapRecExpf"><span class="hs-identifier hs-var hs-var">wrapRecExpf</span></a></span></span><span> </span><span id="local-6989586621680934750"><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934750"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621680934749"><span class="annot"><span class="annottext">e :: CmmExpr
</span><a href="#local-6989586621680934749"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmMachOp"><span class="hs-identifier hs-type">CmmMachOp</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680934748"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934748"><span class="hs-identifier hs-var">es</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680934747"><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934747"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; z -&gt; z) -&gt; z -&gt; [CmmExpr] -&gt; z
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CmmExpr -&gt; z -&gt; z) -&gt; CmmExpr -&gt; z -&gt; z
forall z. (CmmExpr -&gt; z -&gt; z) -&gt; CmmExpr -&gt; z -&gt; z
</span><a href="GHC.Cmm.Node.html#wrapRecExpf"><span class="hs-identifier hs-var">wrapRecExpf</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934750"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934750"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934749"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934747"><span class="hs-identifier hs-var">z</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934748"><span class="hs-identifier hs-var">es</span></a></span><span>
</span><span id="line-550"></span><span class="annot"><a href="GHC.Cmm.Node.html#wrapRecExpf"><span class="hs-identifier hs-var">wrapRecExpf</span></a></span><span> </span><span id="local-6989586621680934746"><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934746"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621680934745"><span class="annot"><span class="annottext">e :: CmmExpr
</span><a href="#local-6989586621680934745"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLoad"><span class="hs-identifier hs-type">CmmLoad</span></a></span><span> </span><span id="local-6989586621680934744"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934744"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmType
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680934743"><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934743"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; z -&gt; z) -&gt; CmmExpr -&gt; z -&gt; z
forall z. (CmmExpr -&gt; z -&gt; z) -&gt; CmmExpr -&gt; z -&gt; z
</span><a href="GHC.Cmm.Node.html#wrapRecExpf"><span class="hs-identifier hs-var">wrapRecExpf</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934746"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934744"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934746"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934745"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934743"><span class="hs-identifier hs-var">z</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-551"></span><span class="annot"><a href="GHC.Cmm.Node.html#wrapRecExpf"><span class="hs-identifier hs-var">wrapRecExpf</span></a></span><span> </span><span id="local-6989586621680934742"><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934742"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621680934741"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934741"><span class="hs-identifier hs-var">e</span></a></span></span><span>                  </span><span id="local-6989586621680934740"><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934740"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934742"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934741"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934740"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-552"></span><span>
</span><span id="line-553"></span><span id="local-6989586621680935533"><span id="local-6989586621680935534"><span id="local-6989586621680935535"><span class="annot"><a href="GHC.Cmm.Node.html#foldExp"><span class="hs-identifier hs-type">foldExp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935535"><span class="hs-identifier hs-type">z</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935535"><span class="hs-identifier hs-type">z</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935534"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680935533"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935535"><span class="hs-identifier hs-type">z</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680935535"><span class="hs-identifier hs-type">z</span></a></span></span></span></span><span>
</span><span id="line-554"></span><span id="foldExp"><span class="annot"><span class="annottext">foldExp :: forall z (e :: Extensibility) (x :: Extensibility).
(CmmExpr -&gt; z -&gt; z) -&gt; CmmNode e x -&gt; z -&gt; z
</span><a href="GHC.Cmm.Node.html#foldExp"><span class="hs-identifier hs-var hs-var">foldExp</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmEntry"><span class="hs-identifier hs-type">CmmEntry</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680934737"><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934737"><span class="hs-identifier hs-var">z</span></a></span></span><span>                         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934737"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-555"></span><span class="annot"><a href="GHC.Cmm.Node.html#foldExp"><span class="hs-identifier hs-var">foldExp</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmComment"><span class="hs-identifier hs-type">CmmComment</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680934734"><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934734"><span class="hs-identifier hs-var">z</span></a></span></span><span>                       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934734"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-556"></span><span class="annot"><a href="GHC.Cmm.Node.html#foldExp"><span class="hs-identifier hs-var">foldExp</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTick"><span class="hs-identifier hs-type">CmmTick</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680934731"><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934731"><span class="hs-identifier hs-var">z</span></a></span></span><span>                          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934731"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-557"></span><span class="annot"><a href="GHC.Cmm.Node.html#foldExp"><span class="hs-identifier hs-var">foldExp</span></a></span><span> </span><span id="local-6989586621680934730"><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934730"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmUnwind"><span class="hs-identifier hs-type">CmmUnwind</span></a></span><span> </span><span id="local-6989586621680934726"><span class="annot"><span class="annottext">[(GlobalReg, Maybe CmmExpr)]
</span><a href="#local-6989586621680934726"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680934725"><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934725"><span class="hs-identifier hs-var">z</span></a></span></span><span>                        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Maybe CmmExpr -&gt; z -&gt; z) -&gt; z -&gt; [Maybe CmmExpr] -&gt; z
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(z -&gt; z) -&gt; (CmmExpr -&gt; z -&gt; z) -&gt; Maybe CmmExpr -&gt; z -&gt; z
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="annot"><span class="annottext">z -&gt; z
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934730"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934725"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((GlobalReg, Maybe CmmExpr) -&gt; Maybe CmmExpr)
-&gt; [(GlobalReg, Maybe CmmExpr)] -&gt; [Maybe CmmExpr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(GlobalReg, Maybe CmmExpr) -&gt; Maybe CmmExpr
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="annot"><span class="annottext">[(GlobalReg, Maybe CmmExpr)]
</span><a href="#local-6989586621680934726"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-558"></span><span class="annot"><a href="GHC.Cmm.Node.html#foldExp"><span class="hs-identifier hs-var">foldExp</span></a></span><span> </span><span id="local-6989586621680934723"><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934723"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmAssign"><span class="hs-identifier hs-type">CmmAssign</span></a></span><span> </span><span class="annot"><span class="annottext">CmmReg
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680934720"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934720"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680934719"><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934719"><span class="hs-identifier hs-var">z</span></a></span></span><span>                       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934723"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934720"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934719"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-559"></span><span class="annot"><a href="GHC.Cmm.Node.html#foldExp"><span class="hs-identifier hs-var">foldExp</span></a></span><span> </span><span id="local-6989586621680934718"><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934718"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmStore"><span class="hs-identifier hs-type">CmmStore</span></a></span><span> </span><span id="local-6989586621680934715"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934715"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span id="local-6989586621680934714"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934714"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680934713"><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934713"><span class="hs-identifier hs-var">z</span></a></span></span><span>                     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934718"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934715"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">(z -&gt; z) -&gt; z -&gt; z
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934718"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934714"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934713"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-560"></span><span class="annot"><a href="GHC.Cmm.Node.html#foldExp"><span class="hs-identifier hs-var">foldExp</span></a></span><span> </span><span id="local-6989586621680934712"><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934712"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmUnsafeForeignCall"><span class="hs-identifier hs-type">CmmUnsafeForeignCall</span></a></span><span> </span><span id="local-6989586621680934708"><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680934708"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="annot"><span class="annottext">[CmmFormal]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680934707"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934707"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680934706"><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934706"><span class="hs-identifier hs-var">z</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; z -&gt; z) -&gt; z -&gt; [CmmExpr] -&gt; z
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934712"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CmmExpr -&gt; z -&gt; z) -&gt; ForeignTarget -&gt; z -&gt; z
forall z. (CmmExpr -&gt; z -&gt; z) -&gt; ForeignTarget -&gt; z -&gt; z
</span><a href="GHC.Cmm.Node.html#foldExpForeignTarget"><span class="hs-identifier hs-var">foldExpForeignTarget</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934712"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680934708"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934706"><span class="hs-identifier hs-var">z</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934707"><span class="hs-keyword hs-var">as</span></a></span><span>
</span><span id="line-561"></span><span class="annot"><a href="GHC.Cmm.Node.html#foldExp"><span class="hs-identifier hs-var">foldExp</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmBranch"><span class="hs-identifier hs-type">CmmBranch</span></a></span><span> </span><span class="annot"><span class="annottext">Label
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680934703"><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934703"><span class="hs-identifier hs-var">z</span></a></span></span><span>                         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934703"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-562"></span><span class="annot"><a href="GHC.Cmm.Node.html#foldExp"><span class="hs-identifier hs-var">foldExp</span></a></span><span> </span><span id="local-6989586621680934702"><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934702"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmCondBranch"><span class="hs-identifier hs-type">CmmCondBranch</span></a></span><span> </span><span id="local-6989586621680934699"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934699"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="annot"><span class="annottext">Label
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Label
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Maybe Bool
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680934698"><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934698"><span class="hs-identifier hs-var">z</span></a></span></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934702"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934699"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934698"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-563"></span><span class="annot"><a href="GHC.Cmm.Node.html#foldExp"><span class="hs-identifier hs-var">foldExp</span></a></span><span> </span><span id="local-6989586621680934697"><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934697"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmSwitch"><span class="hs-identifier hs-type">CmmSwitch</span></a></span><span> </span><span id="local-6989586621680934694"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934694"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="annot"><span class="annottext">SwitchTargets
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680934693"><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934693"><span class="hs-identifier hs-var">z</span></a></span></span><span>                       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934697"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934694"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934693"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-564"></span><span class="annot"><a href="GHC.Cmm.Node.html#foldExp"><span class="hs-identifier hs-var">foldExp</span></a></span><span> </span><span id="local-6989586621680934692"><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934692"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmCall"><span class="hs-identifier hs-type">CmmCall</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">cml_target :: CmmNode 'Open 'Closed -&gt; CmmExpr
</span><a href="GHC.Cmm.Node.html#cml_target"><span class="hs-identifier hs-var">cml_target</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621680934689"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934689"><span class="hs-identifier hs-var">tgt</span></a></span></span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680934688"><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934688"><span class="hs-identifier hs-var">z</span></a></span></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934692"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934689"><span class="hs-identifier hs-var">tgt</span></a></span><span> </span><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934688"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-565"></span><span class="annot"><a href="GHC.Cmm.Node.html#foldExp"><span class="hs-identifier hs-var">foldExp</span></a></span><span> </span><span id="local-6989586621680934687"><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934687"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmForeignCall"><span class="hs-identifier hs-type">CmmForeignCall</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">tgt :: CmmNode 'Open 'Closed -&gt; ForeignTarget
</span><a href="GHC.Cmm.Node.html#tgt"><span class="hs-identifier hs-var">tgt</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621680934683"><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680934683"><span class="hs-identifier hs-var">tgt</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">args :: CmmNode 'Open 'Closed -&gt; [CmmExpr]
</span><a href="GHC.Cmm.Node.html#args"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621680934682"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934682"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680934681"><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934681"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; z -&gt; z) -&gt; z -&gt; [CmmExpr] -&gt; z
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934687"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CmmExpr -&gt; z -&gt; z) -&gt; ForeignTarget -&gt; z -&gt; z
forall z. (CmmExpr -&gt; z -&gt; z) -&gt; ForeignTarget -&gt; z -&gt; z
</span><a href="GHC.Cmm.Node.html#foldExpForeignTarget"><span class="hs-identifier hs-var">foldExpForeignTarget</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934687"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621680934683"><span class="hs-identifier hs-var">tgt</span></a></span><span> </span><span class="annot"><span class="annottext">z
</span><a href="#local-6989586621680934681"><span class="hs-identifier hs-var">z</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621680934682"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-566"></span><span>
</span><span id="line-567"></span><span id="local-6989586621680934678"><span id="local-6989586621680934679"><span id="local-6989586621680934680"><span class="annot"><a href="GHC.Cmm.Node.html#foldExpDeep"><span class="hs-identifier hs-type">foldExpDeep</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680934680"><span class="hs-identifier hs-type">z</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680934680"><span class="hs-identifier hs-type">z</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680934679"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680934678"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680934680"><span class="hs-identifier hs-type">z</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680934680"><span class="hs-identifier hs-type">z</span></a></span></span></span></span><span>
</span><span id="line-568"></span><span id="foldExpDeep"><span class="annot"><span class="annottext">foldExpDeep :: forall z (e :: Extensibility) (x :: Extensibility).
(CmmExpr -&gt; z -&gt; z) -&gt; CmmNode e x -&gt; z -&gt; z
</span><a href="GHC.Cmm.Node.html#foldExpDeep"><span class="hs-identifier hs-var hs-var">foldExpDeep</span></a></span></span><span> </span><span id="local-6989586621680934677"><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934677"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; z -&gt; z) -&gt; CmmNode e x -&gt; z -&gt; z
forall z (e :: Extensibility) (x :: Extensibility).
(CmmExpr -&gt; z -&gt; z) -&gt; CmmNode e x -&gt; z -&gt; z
</span><a href="GHC.Cmm.Node.html#foldExp"><span class="hs-identifier hs-var">foldExp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CmmExpr -&gt; z -&gt; z) -&gt; CmmExpr -&gt; z -&gt; z
forall z. (CmmExpr -&gt; z -&gt; z) -&gt; CmmExpr -&gt; z -&gt; z
</span><a href="GHC.Cmm.Node.html#wrapRecExpf"><span class="hs-identifier hs-var">wrapRecExpf</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; z -&gt; z
</span><a href="#local-6989586621680934677"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-569"></span><span>
</span><span id="line-570"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-571"></span><span>
</span><span id="line-572"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapSuccessors"><span class="hs-identifier hs-type">mapSuccessors</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#Label"><span class="hs-identifier hs-type">Label</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#Label"><span class="hs-identifier hs-type">Label</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span>
</span><span id="line-573"></span><span id="mapSuccessors"><span class="annot"><span class="annottext">mapSuccessors :: (Label -&gt; Label) -&gt; CmmNode 'Open 'Closed -&gt; CmmNode 'Open 'Closed
</span><a href="GHC.Cmm.Node.html#mapSuccessors"><span class="hs-identifier hs-var hs-var">mapSuccessors</span></a></span></span><span> </span><span id="local-6989586621680934676"><span class="annot"><span class="annottext">Label -&gt; Label
</span><a href="#local-6989586621680934676"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmBranch"><span class="hs-identifier hs-type">CmmBranch</span></a></span><span> </span><span id="local-6989586621680934673"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934673"><span class="hs-identifier hs-var">bid</span></a></span></span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Label -&gt; CmmNode 'Open 'Closed
</span><a href="GHC.Cmm.Node.html#CmmBranch"><span class="hs-identifier hs-var">CmmBranch</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Label -&gt; Label
</span><a href="#local-6989586621680934676"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934673"><span class="hs-identifier hs-var">bid</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-574"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapSuccessors"><span class="hs-identifier hs-var">mapSuccessors</span></a></span><span> </span><span id="local-6989586621680934672"><span class="annot"><span class="annottext">Label -&gt; Label
</span><a href="#local-6989586621680934672"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmCondBranch"><span class="hs-identifier hs-type">CmmCondBranch</span></a></span><span> </span><span id="local-6989586621680934669"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934669"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680934668"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934668"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span id="local-6989586621680934667"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934667"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621680934666"><span class="annot"><span class="annottext">Maybe Bool
</span><a href="#local-6989586621680934666"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Label -&gt; Label -&gt; Maybe Bool -&gt; CmmNode 'Open 'Closed
</span><a href="GHC.Cmm.Node.html#CmmCondBranch"><span class="hs-identifier hs-var">CmmCondBranch</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934669"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Label -&gt; Label
</span><a href="#local-6989586621680934672"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934668"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Label -&gt; Label
</span><a href="#local-6989586621680934672"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934667"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe Bool
</span><a href="#local-6989586621680934666"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-575"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapSuccessors"><span class="hs-identifier hs-var">mapSuccessors</span></a></span><span> </span><span id="local-6989586621680934665"><span class="annot"><span class="annottext">Label -&gt; Label
</span><a href="#local-6989586621680934665"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmSwitch"><span class="hs-identifier hs-type">CmmSwitch</span></a></span><span> </span><span id="local-6989586621680934662"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934662"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621680934661"><span class="annot"><span class="annottext">SwitchTargets
</span><a href="#local-6989586621680934661"><span class="hs-identifier hs-var">ids</span></a></span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; SwitchTargets -&gt; CmmNode 'Open 'Closed
</span><a href="GHC.Cmm.Node.html#CmmSwitch"><span class="hs-identifier hs-var">CmmSwitch</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934662"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Label -&gt; Label) -&gt; SwitchTargets -&gt; SwitchTargets
</span><a href="GHC.Cmm.Switch.html#mapSwitchTargets"><span class="hs-identifier hs-var">mapSwitchTargets</span></a></span><span> </span><span class="annot"><span class="annottext">Label -&gt; Label
</span><a href="#local-6989586621680934665"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">SwitchTargets
</span><a href="#local-6989586621680934661"><span class="hs-identifier hs-var">ids</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-576"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapSuccessors"><span class="hs-identifier hs-var">mapSuccessors</span></a></span><span> </span><span class="annot"><span class="annottext">Label -&gt; Label
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680934659"><span class="annot"><span class="annottext">CmmNode 'Open 'Closed
</span><a href="#local-6989586621680934659"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmNode 'Open 'Closed
</span><a href="#local-6989586621680934659"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-577"></span><span>
</span><span id="line-578"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapCollectSuccessors"><span class="hs-identifier hs-type">mapCollectSuccessors</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621680935525"><span class="annot"><a href="#local-6989586621680935525"><span class="hs-identifier hs-type">a</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#Label"><span class="hs-identifier hs-type">Label</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#Label"><span class="hs-identifier hs-type">Label</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621680935525"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span>
</span><span id="line-579"></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680935525"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-580"></span><span id="mapCollectSuccessors"><span class="annot"><span class="annottext">mapCollectSuccessors :: forall a.
(Label -&gt; (Label, a))
-&gt; CmmNode 'Open 'Closed -&gt; (CmmNode 'Open 'Closed, [a])
</span><a href="GHC.Cmm.Node.html#mapCollectSuccessors"><span class="hs-identifier hs-var hs-var">mapCollectSuccessors</span></a></span></span><span> </span><span id="local-6989586621680934658"><span class="annot"><span class="annottext">Label -&gt; (Label, a)
</span><a href="#local-6989586621680934658"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmBranch"><span class="hs-identifier hs-type">CmmBranch</span></a></span><span> </span><span id="local-6989586621680934655"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934655"><span class="hs-identifier hs-var">bid</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-581"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680934654"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934654"><span class="hs-identifier hs-var">bid'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680934653"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680934653"><span class="hs-identifier hs-var">acc</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Label -&gt; (Label, a)
</span><a href="#local-6989586621680934658"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934655"><span class="hs-identifier hs-var">bid</span></a></span><span> </span><span class="hs-keyword">in</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Label -&gt; CmmNode 'Open 'Closed
</span><a href="GHC.Cmm.Node.html#CmmBranch"><span class="hs-identifier hs-var">CmmBranch</span></a></span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934654"><span class="hs-identifier hs-var">bid'</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680934653"><span class="hs-identifier hs-var">acc</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-582"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapCollectSuccessors"><span class="hs-identifier hs-var">mapCollectSuccessors</span></a></span><span> </span><span id="local-6989586621680934652"><span class="annot"><span class="annottext">Label -&gt; (Label, a)
</span><a href="#local-6989586621680934652"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmCondBranch"><span class="hs-identifier hs-type">CmmCondBranch</span></a></span><span> </span><span id="local-6989586621680934649"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934649"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680934648"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934648"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span id="local-6989586621680934647"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934647"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621680934646"><span class="annot"><span class="annottext">Maybe Bool
</span><a href="#local-6989586621680934646"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-583"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680934645"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934645"><span class="hs-identifier hs-var">bidt</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680934644"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680934644"><span class="hs-identifier hs-var">acct</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Label -&gt; (Label, a)
</span><a href="#local-6989586621680934652"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934648"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-584"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621680934643"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934643"><span class="hs-identifier hs-var">bidf</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680934642"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680934642"><span class="hs-identifier hs-var">accf</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Label -&gt; (Label, a)
</span><a href="#local-6989586621680934652"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934647"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-585"></span><span>    </span><span class="hs-keyword">in</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmExpr -&gt; Label -&gt; Label -&gt; Maybe Bool -&gt; CmmNode 'Open 'Closed
</span><a href="GHC.Cmm.Node.html#CmmCondBranch"><span class="hs-identifier hs-var">CmmCondBranch</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934649"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934645"><span class="hs-identifier hs-var">bidt</span></a></span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934643"><span class="hs-identifier hs-var">bidf</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Bool
</span><a href="#local-6989586621680934646"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680934642"><span class="hs-identifier hs-var">accf</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680934644"><span class="hs-identifier hs-var">acct</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-586"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapCollectSuccessors"><span class="hs-identifier hs-var">mapCollectSuccessors</span></a></span><span> </span><span id="local-6989586621680934641"><span class="annot"><span class="annottext">Label -&gt; (Label, a)
</span><a href="#local-6989586621680934641"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmSwitch"><span class="hs-identifier hs-type">CmmSwitch</span></a></span><span> </span><span id="local-6989586621680934632"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934632"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621680934631"><span class="annot"><span class="annottext">SwitchTargets
</span><a href="#local-6989586621680934631"><span class="hs-identifier hs-var">ids</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-587"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680934630"><span class="annot"><span class="annottext">lbls :: [Label]
</span><a href="#local-6989586621680934630"><span class="hs-identifier hs-var hs-var">lbls</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SwitchTargets -&gt; [Label]
</span><a href="GHC.Cmm.Switch.html#switchTargetsToList"><span class="hs-identifier hs-var">switchTargetsToList</span></a></span><span> </span><span class="annot"><span class="annottext">SwitchTargets
</span><a href="#local-6989586621680934631"><span class="hs-identifier hs-var">ids</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#Label"><span class="hs-identifier hs-type">Label</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-588"></span><span>        </span><span id="local-6989586621680934629"><span class="annot"><span class="annottext">lblMap :: LabelMap (Label, a)
</span><a href="#local-6989586621680934629"><span class="hs-identifier hs-var hs-var">lblMap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(KeyOf LabelMap, (Label, a))] -&gt; LabelMap (Label, a)
forall (map :: * -&gt; *) a. IsMap map =&gt; [(KeyOf map, a)] -&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapFromList"><span class="hs-identifier hs-var">mapFromList</span></a></span><span> </span><span class="annot"><span class="annottext">([(KeyOf LabelMap, (Label, a))] -&gt; LabelMap (Label, a))
-&gt; [(KeyOf LabelMap, (Label, a))] -&gt; LabelMap (Label, a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Label] -&gt; [(Label, a)] -&gt; [(Label, (Label, a))]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-identifier hs-var">zip</span></a></span><span> </span><span class="annot"><span class="annottext">[Label]
</span><a href="#local-6989586621680934630"><span class="hs-identifier hs-var">lbls</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Label -&gt; (Label, a)) -&gt; [Label] -&gt; [(Label, a)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Label -&gt; (Label, a)
</span><a href="#local-6989586621680934641"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[Label]
</span><a href="#local-6989586621680934630"><span class="hs-identifier hs-var">lbls</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#Label"><span class="hs-identifier hs-type">Label</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621680935525"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-589"></span><span>    </span><span class="hs-keyword">in</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; SwitchTargets -&gt; CmmNode 'Open 'Closed
</span><a href="GHC.Cmm.Node.html#CmmSwitch"><span class="hs-identifier hs-var">CmmSwitch</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621680934632"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-590"></span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Label -&gt; Label) -&gt; SwitchTargets -&gt; SwitchTargets
</span><a href="GHC.Cmm.Switch.html#mapSwitchTargets"><span class="hs-identifier hs-var">mapSwitchTargets</span></a></span><span>
</span><span id="line-591"></span><span>            </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680934627"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680934627"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Label, a) -&gt; Label
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">((Label, a) -&gt; Label) -&gt; (Label, a) -&gt; Label
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Label, a) -&gt; KeyOf LabelMap -&gt; LabelMap (Label, a) -&gt; (Label, a)
forall (map :: * -&gt; *) a. IsMap map =&gt; a -&gt; KeyOf map -&gt; map a -&gt; a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapFindWithDefault"><span class="hs-identifier hs-var">mapFindWithDefault</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Char] -&gt; (Label, a)
forall a. HasCallStack =&gt; [Char] -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;impossible&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap
Label
</span><a href="#local-6989586621680934627"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap (Label, a)
</span><a href="#local-6989586621680934629"><span class="hs-identifier hs-var">lblMap</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SwitchTargets
</span><a href="#local-6989586621680934631"><span class="hs-identifier hs-var">ids</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-592"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">((Label, a) -&gt; a) -&gt; [(Label, a)] -&gt; [a]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(Label, a) -&gt; a
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LabelMap (Label, a) -&gt; [(Label, a)]
forall (map :: * -&gt; *) a. IsMap map =&gt; map a -&gt; [a]
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapElems"><span class="hs-identifier hs-var">mapElems</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap (Label, a)
</span><a href="#local-6989586621680934629"><span class="hs-identifier hs-var">lblMap</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-593"></span><span>        </span><span class="hs-special">)</span><span>
</span><span id="line-594"></span><span class="annot"><a href="GHC.Cmm.Node.html#mapCollectSuccessors"><span class="hs-identifier hs-var">mapCollectSuccessors</span></a></span><span> </span><span class="annot"><span class="annottext">Label -&gt; (Label, a)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680934623"><span class="annot"><span class="annottext">CmmNode 'Open 'Closed
</span><a href="#local-6989586621680934623"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmNode 'Open 'Closed
</span><a href="#local-6989586621680934623"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-595"></span><span>
</span><span id="line-596"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-597"></span><span>
</span><span id="line-598"></span><span class="hs-comment">-- | Tickish in Cmm context (annotations only)</span><span>
</span><span id="line-599"></span><span class="hs-keyword">type</span><span> </span><span id="CmmTickish"><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickish"><span class="hs-identifier hs-var">CmmTickish</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.html#Tickish"><span class="hs-identifier hs-type">Tickish</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-600"></span><span>
</span><span id="line-601"></span><span class="hs-comment">-- | Tick scope identifier, allowing us to reason about what</span><span>
</span><span id="line-602"></span><span class="hs-comment">-- annotations in a Cmm block should scope over. We especially take</span><span>
</span><span id="line-603"></span><span class="hs-comment">-- care to allow optimisations to reorganise blocks without losing</span><span>
</span><span id="line-604"></span><span class="hs-comment">-- tick association in the process.</span><span>
</span><span id="line-605"></span><span class="hs-keyword">data</span><span> </span><span id="CmmTickScope"><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-var">CmmTickScope</span></a></span></span><span>
</span><span id="line-606"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="GlobalScope"><span class="annot"><a href="GHC.Cmm.Node.html#GlobalScope"><span class="hs-identifier hs-var">GlobalScope</span></a></span></span><span>
</span><span id="line-607"></span><span>    </span><span class="hs-comment">-- ^ The global scope is the &quot;root&quot; of the scope graph. Every</span><span>
</span><span id="line-608"></span><span>    </span><span class="hs-comment">-- scope is a sub-scope of the global scope. It doesn't make sense</span><span>
</span><span id="line-609"></span><span>    </span><span class="hs-comment">-- to add ticks to this scope. On the other hand, this means that</span><span>
</span><span id="line-610"></span><span>    </span><span class="hs-comment">-- setting this scope on a block means no ticks apply to it.</span><span>
</span><span id="line-611"></span><span>
</span><span id="line-612"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="SubScope"><span class="annot"><a href="GHC.Cmm.Node.html#SubScope"><span class="hs-identifier hs-var">SubScope</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">U.Unique</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-type">CmmTickScope</span></a></span><span>
</span><span id="line-613"></span><span>    </span><span class="hs-comment">-- ^ Constructs a new sub-scope to an existing scope. This allows</span><span>
</span><span id="line-614"></span><span>    </span><span class="hs-comment">-- us to translate Core-style scoping rules (see @tickishScoped@)</span><span>
</span><span id="line-615"></span><span>    </span><span class="hs-comment">-- into the Cmm world. Suppose the following code:</span><span>
</span><span id="line-616"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-617"></span><span>    </span><span class="hs-comment">--   tick&lt;1&gt; case ... of</span><span>
</span><span id="line-618"></span><span>    </span><span class="hs-comment">--             A -&gt; tick&lt;2&gt; ...</span><span>
</span><span id="line-619"></span><span>    </span><span class="hs-comment">--             B -&gt; tick&lt;3&gt; ...</span><span>
</span><span id="line-620"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-621"></span><span>    </span><span class="hs-comment">-- We want the top-level tick annotation to apply to blocks</span><span>
</span><span id="line-622"></span><span>    </span><span class="hs-comment">-- generated for the A and B alternatives. We can achieve that by</span><span>
</span><span id="line-623"></span><span>    </span><span class="hs-comment">-- generating tick&lt;1&gt; into a block with scope a, while the code</span><span>
</span><span id="line-624"></span><span>    </span><span class="hs-comment">-- for alternatives A and B gets generated into sub-scopes a/b and</span><span>
</span><span id="line-625"></span><span>    </span><span class="hs-comment">-- a/c respectively.</span><span>
</span><span id="line-626"></span><span>
</span><span id="line-627"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CombinedScope"><span class="annot"><a href="GHC.Cmm.Node.html#CombinedScope"><span class="hs-identifier hs-var">CombinedScope</span></a></span></span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-type">CmmTickScope</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-type">CmmTickScope</span></a></span><span>
</span><span id="line-628"></span><span>    </span><span class="hs-comment">-- ^ A combined scope scopes over everything that the two given</span><span>
</span><span id="line-629"></span><span>    </span><span class="hs-comment">-- scopes cover. It is therefore a sub-scope of either scope. This</span><span>
</span><span id="line-630"></span><span>    </span><span class="hs-comment">-- is required for optimisations. Consider common block elimination:</span><span>
</span><span id="line-631"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-632"></span><span>    </span><span class="hs-comment">--   A -&gt; tick&lt;2&gt; case ... of</span><span>
</span><span id="line-633"></span><span>    </span><span class="hs-comment">--     C -&gt; [common]</span><span>
</span><span id="line-634"></span><span>    </span><span class="hs-comment">--   B -&gt; tick&lt;3&gt; case ... of</span><span>
</span><span id="line-635"></span><span>    </span><span class="hs-comment">--     D -&gt; [common]</span><span>
</span><span id="line-636"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-637"></span><span>    </span><span class="hs-comment">-- We will generate code for the C and D alternatives, and figure</span><span>
</span><span id="line-638"></span><span>    </span><span class="hs-comment">-- out afterwards that it's actually common code. Scoping rules</span><span>
</span><span id="line-639"></span><span>    </span><span class="hs-comment">-- dictate that the resulting common block needs to be covered by</span><span>
</span><span id="line-640"></span><span>    </span><span class="hs-comment">-- both tick&lt;2&gt; and tick&lt;3&gt;, therefore we need to construct a</span><span>
</span><span id="line-641"></span><span>    </span><span class="hs-comment">-- scope that is a child to *both* scope. Now we can do that - if</span><span>
</span><span id="line-642"></span><span>    </span><span class="hs-comment">-- we assign the scopes a/c and b/d to the common-ed up blocks,</span><span>
</span><span id="line-643"></span><span>    </span><span class="hs-comment">-- the new block could have a combined tick scope a/c+b/d, which</span><span>
</span><span id="line-644"></span><span>    </span><span class="hs-comment">-- both tick&lt;2&gt; and tick&lt;3&gt; apply to.</span><span>
</span><span id="line-645"></span><span>
</span><span id="line-646"></span><span class="hs-comment">-- Note [CmmTick scoping details]:</span><span>
</span><span id="line-647"></span><span class="hs-comment">--</span><span>
</span><span id="line-648"></span><span class="hs-comment">-- The scope of a @CmmTick@ is given by the @CmmEntry@ node of the</span><span>
</span><span id="line-649"></span><span class="hs-comment">-- same block. Note that as a result of this, optimisations making</span><span>
</span><span id="line-650"></span><span class="hs-comment">-- tick scopes more specific can *reduce* the amount of code a tick</span><span>
</span><span id="line-651"></span><span class="hs-comment">-- scopes over. Fixing this would require a separate @CmmTickScope@</span><span>
</span><span id="line-652"></span><span class="hs-comment">-- field for @CmmTick@. Right now we do not do this simply because I</span><span>
</span><span id="line-653"></span><span class="hs-comment">-- couldn't find an example where it actually mattered -- multiple</span><span>
</span><span id="line-654"></span><span class="hs-comment">-- blocks within the same scope generally jump to each other, which</span><span>
</span><span id="line-655"></span><span class="hs-comment">-- prevents common block elimination from happening in the first</span><span>
</span><span id="line-656"></span><span class="hs-comment">-- place. But this is no strong reason, so if Cmm optimisations become</span><span>
</span><span id="line-657"></span><span class="hs-comment">-- more involved in future this might have to be revisited.</span><span>
</span><span id="line-658"></span><span>
</span><span id="line-659"></span><span class="hs-comment">-- | Output all scope paths.</span><span>
</span><span id="line-660"></span><span class="annot"><a href="GHC.Cmm.Node.html#scopeToPaths"><span class="hs-identifier hs-type">scopeToPaths</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-type">CmmTickScope</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">U.Unique</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span><span>
</span><span id="line-661"></span><span id="scopeToPaths"><span class="annot"><span class="annottext">scopeToPaths :: CmmTickScope -&gt; [[Unique]]
</span><a href="GHC.Cmm.Node.html#scopeToPaths"><span class="hs-identifier hs-var hs-var">scopeToPaths</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="GHC.Cmm.Node.html#GlobalScope"><span class="hs-identifier hs-var">GlobalScope</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">]</span><span>
</span><span id="line-662"></span><span class="annot"><a href="GHC.Cmm.Node.html#scopeToPaths"><span class="hs-identifier hs-var">scopeToPaths</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#SubScope"><span class="hs-identifier hs-type">SubScope</span></a></span><span> </span><span id="local-6989586621680934618"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680934618"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span id="local-6989586621680934617"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934617"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([Unique] -&gt; [Unique]) -&gt; [[Unique]] -&gt; [[Unique]]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680934618"><span class="hs-identifier hs-var">u</span></a></span><span class="annot"><span class="annottext">Unique -&gt; [Unique] -&gt; [Unique]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmTickScope -&gt; [[Unique]]
</span><a href="GHC.Cmm.Node.html#scopeToPaths"><span class="hs-identifier hs-var">scopeToPaths</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934617"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-663"></span><span class="annot"><a href="GHC.Cmm.Node.html#scopeToPaths"><span class="hs-identifier hs-var">scopeToPaths</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CombinedScope"><span class="hs-identifier hs-type">CombinedScope</span></a></span><span> </span><span id="local-6989586621680934616"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934616"><span class="hs-identifier hs-var">s1</span></a></span></span><span> </span><span id="local-6989586621680934615"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934615"><span class="hs-identifier hs-var">s2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; [[Unique]]
</span><a href="GHC.Cmm.Node.html#scopeToPaths"><span class="hs-identifier hs-var">scopeToPaths</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934616"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="annot"><span class="annottext">[[Unique]] -&gt; [[Unique]] -&gt; [[Unique]]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; [[Unique]]
</span><a href="GHC.Cmm.Node.html#scopeToPaths"><span class="hs-identifier hs-var">scopeToPaths</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934615"><span class="hs-identifier hs-var">s2</span></a></span><span>
</span><span id="line-664"></span><span>
</span><span id="line-665"></span><span class="hs-comment">-- | Returns the head uniques of the scopes. This is based on the</span><span>
</span><span id="line-666"></span><span class="hs-comment">-- assumption that the @Unique@ of @SubScope@ identifies the</span><span>
</span><span id="line-667"></span><span class="hs-comment">-- underlying super-scope. Used for efficient equality and comparison,</span><span>
</span><span id="line-668"></span><span class="hs-comment">-- see below.</span><span>
</span><span id="line-669"></span><span class="annot"><a href="GHC.Cmm.Node.html#scopeUniques"><span class="hs-identifier hs-type">scopeUniques</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-type">CmmTickScope</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">U.Unique</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-670"></span><span id="scopeUniques"><span class="annot"><span class="annottext">scopeUniques :: CmmTickScope -&gt; [Unique]
</span><a href="GHC.Cmm.Node.html#scopeUniques"><span class="hs-identifier hs-var hs-var">scopeUniques</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="GHC.Cmm.Node.html#GlobalScope"><span class="hs-identifier hs-var">GlobalScope</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-671"></span><span class="annot"><a href="GHC.Cmm.Node.html#scopeUniques"><span class="hs-identifier hs-var">scopeUniques</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#SubScope"><span class="hs-identifier hs-type">SubScope</span></a></span><span> </span><span id="local-6989586621680934613"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680934613"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680934613"><span class="hs-identifier hs-var">u</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-672"></span><span class="annot"><a href="GHC.Cmm.Node.html#scopeUniques"><span class="hs-identifier hs-var">scopeUniques</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CombinedScope"><span class="hs-identifier hs-type">CombinedScope</span></a></span><span> </span><span id="local-6989586621680934612"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934612"><span class="hs-identifier hs-var">s1</span></a></span></span><span> </span><span id="local-6989586621680934611"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934611"><span class="hs-identifier hs-var">s2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; [Unique]
</span><a href="GHC.Cmm.Node.html#scopeUniques"><span class="hs-identifier hs-var">scopeUniques</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934612"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="annot"><span class="annottext">[Unique] -&gt; [Unique] -&gt; [Unique]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; [Unique]
</span><a href="GHC.Cmm.Node.html#scopeUniques"><span class="hs-identifier hs-var">scopeUniques</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934611"><span class="hs-identifier hs-var">s2</span></a></span><span>
</span><span id="line-673"></span><span>
</span><span id="line-674"></span><span class="hs-comment">-- Equality and order is based on the head uniques defined above. We</span><span>
</span><span id="line-675"></span><span class="hs-comment">-- take care to short-cut the (extremely) common cases.</span><span>
</span><span id="line-676"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680934608"><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-type">CmmTickScope</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-677"></span><span>  </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="GHC.Cmm.Node.html#GlobalScope"><span class="hs-identifier hs-var">GlobalScope</span></a></span><span>    </span><span id="local-6989586621680934604"><span class="annot"><span class="annottext">== :: CmmTickScope -&gt; CmmTickScope -&gt; Bool
</span><span class="hs-operator hs-var hs-var hs-var hs-var">==</span></span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="GHC.Cmm.Node.html#GlobalScope"><span class="hs-identifier hs-var">GlobalScope</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-678"></span><span>  </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="GHC.Cmm.Node.html#GlobalScope"><span class="hs-identifier hs-var">GlobalScope</span></a></span><span>    </span><span class="annot"><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-679"></span><span>  </span><span class="annot"><span class="annottext">CmmTickScope
</span><span class="hs-identifier">_</span></span><span>              </span><span class="annot"><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="GHC.Cmm.Node.html#GlobalScope"><span class="hs-identifier hs-var">GlobalScope</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-680"></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#SubScope"><span class="hs-identifier hs-type">SubScope</span></a></span><span> </span><span id="local-6989586621680934603"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680934603"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="hs-operator hs-var">==</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#SubScope"><span class="hs-identifier hs-type">SubScope</span></a></span><span> </span><span id="local-6989586621680934602"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680934602"><span class="hs-identifier hs-var">u'</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680934603"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680934602"><span class="hs-identifier hs-var">u'</span></a></span><span>
</span><span id="line-681"></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#SubScope"><span class="hs-identifier hs-type">SubScope</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-682"></span><span>  </span><span class="annot"><span class="annottext">CmmTickScope
</span><span class="hs-identifier">_</span></span><span>              </span><span class="annot"><span class="hs-operator hs-var">==</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#SubScope"><span class="hs-identifier hs-type">SubScope</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-683"></span><span>  </span><span id="local-6989586621680934601"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934601"><span class="hs-identifier hs-var">scope</span></a></span></span><span>          </span><span class="annot"><span class="hs-operator hs-var">==</span></span><span> </span><span id="local-6989586621680934600"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934600"><span class="hs-identifier hs-var">scope'</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span>
</span><span id="line-684"></span><span>    </span><span class="annot"><span class="annottext">(Unique -&gt; Unique -&gt; Ordering) -&gt; [Unique] -&gt; [Unique]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Ordering
</span><a href="GHC.Types.Unique.html#nonDetCmpUnique"><span class="hs-identifier hs-var">nonDetCmpUnique</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmTickScope -&gt; [Unique]
</span><a href="GHC.Cmm.Node.html#scopeUniques"><span class="hs-identifier hs-var">scopeUniques</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934601"><span class="hs-identifier hs-var">scope</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Unique] -&gt; [Unique] -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span>
</span><span id="line-685"></span><span>    </span><span class="annot"><span class="annottext">(Unique -&gt; Unique -&gt; Ordering) -&gt; [Unique] -&gt; [Unique]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Ordering
</span><a href="GHC.Types.Unique.html#nonDetCmpUnique"><span class="hs-identifier hs-var">nonDetCmpUnique</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmTickScope -&gt; [Unique]
</span><a href="GHC.Cmm.Node.html#scopeUniques"><span class="hs-identifier hs-var">scopeUniques</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934600"><span class="hs-identifier hs-var">scope'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-686"></span><span>    </span><span class="hs-comment">-- This is still deterministic because</span><span>
</span><span id="line-687"></span><span>    </span><span class="hs-comment">-- the order is the same for equal lists</span><span>
</span><span id="line-688"></span><span>
</span><span id="line-689"></span><span class="hs-comment">-- This is non-deterministic but we do not currently support deterministic</span><span>
</span><span id="line-690"></span><span class="hs-comment">-- code-generation. See Note [Unique Determinism and code generation]</span><span>
</span><span id="line-691"></span><span class="hs-comment">-- See Note [No Ord for Unique]</span><span>
</span><span id="line-692"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680934585"><span id="local-6989586621680934587"><span id="local-6989586621680934589"><span id="local-6989586621680934591"><span id="local-6989586621680934593"><span id="local-6989586621680934595"><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-type">CmmTickScope</span></a></span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-693"></span><span>  </span><span id="local-6989586621680934583"><span class="annot"><span class="annottext">compare :: CmmTickScope -&gt; CmmTickScope -&gt; Ordering
</span><span class="hs-identifier hs-var hs-var hs-var hs-var">compare</span></span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="GHC.Cmm.Node.html#GlobalScope"><span class="hs-identifier hs-var">GlobalScope</span></a></span><span>    </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="GHC.Cmm.Node.html#GlobalScope"><span class="hs-identifier hs-var">GlobalScope</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">EQ</span></span><span>
</span><span id="line-694"></span><span>  </span><span class="annot"><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="GHC.Cmm.Node.html#GlobalScope"><span class="hs-identifier hs-var">GlobalScope</span></a></span><span>    </span><span class="annot"><span class="annottext">CmmTickScope
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">LT</span></span><span>
</span><span id="line-695"></span><span>  </span><span class="annot"><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><span class="hs-identifier">_</span></span><span>              </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="GHC.Cmm.Node.html#GlobalScope"><span class="hs-identifier hs-var">GlobalScope</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">GT</span></span><span>
</span><span id="line-696"></span><span>  </span><span class="annot"><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#SubScope"><span class="hs-identifier hs-type">SubScope</span></a></span><span> </span><span id="local-6989586621680934581"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680934581"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#SubScope"><span class="hs-identifier hs-type">SubScope</span></a></span><span> </span><span id="local-6989586621680934580"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680934580"><span class="hs-identifier hs-var">u'</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Ordering
</span><a href="GHC.Types.Unique.html#nonDetCmpUnique"><span class="hs-identifier hs-var">nonDetCmpUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680934581"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680934580"><span class="hs-identifier hs-var">u'</span></a></span><span>
</span><span id="line-697"></span><span>  </span><span class="annot"><span class="hs-identifier hs-var">compare</span></span><span> </span><span id="local-6989586621680934579"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934579"><span class="hs-identifier hs-var">scope</span></a></span></span><span> </span><span id="local-6989586621680934578"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934578"><span class="hs-identifier hs-var">scope'</span></a></span></span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Unique -&gt; Unique -&gt; Ordering) -&gt; [Unique] -&gt; [Unique] -&gt; Ordering
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a] -&gt; Ordering
</span><a href="GHC.Utils.Misc.html#cmpList"><span class="hs-identifier hs-var">cmpList</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Ordering
</span><a href="GHC.Types.Unique.html#nonDetCmpUnique"><span class="hs-identifier hs-var">nonDetCmpUnique</span></a></span><span>
</span><span id="line-698"></span><span>     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Unique -&gt; Unique -&gt; Ordering) -&gt; [Unique] -&gt; [Unique]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Ordering
</span><a href="GHC.Types.Unique.html#nonDetCmpUnique"><span class="hs-identifier hs-var">nonDetCmpUnique</span></a></span><span> </span><span class="annot"><span class="annottext">([Unique] -&gt; [Unique]) -&gt; [Unique] -&gt; [Unique]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; [Unique]
</span><a href="GHC.Cmm.Node.html#scopeUniques"><span class="hs-identifier hs-var">scopeUniques</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934579"><span class="hs-identifier hs-var">scope</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-699"></span><span>     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Unique -&gt; Unique -&gt; Ordering) -&gt; [Unique] -&gt; [Unique]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Ordering
</span><a href="GHC.Types.Unique.html#nonDetCmpUnique"><span class="hs-identifier hs-var">nonDetCmpUnique</span></a></span><span> </span><span class="annot"><span class="annottext">([Unique] -&gt; [Unique]) -&gt; [Unique] -&gt; [Unique]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; [Unique]
</span><a href="GHC.Cmm.Node.html#scopeUniques"><span class="hs-identifier hs-var">scopeUniques</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934578"><span class="hs-identifier hs-var">scope'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-700"></span><span>
</span><span id="line-701"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680934574"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-type">CmmTickScope</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-702"></span><span>  </span><span id="local-6989586621680934567"><span class="annot"><span class="annottext">ppr :: CmmTickScope -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="GHC.Cmm.Node.html#GlobalScope"><span class="hs-identifier hs-var">GlobalScope</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;global&quot;</span></span><span>
</span><span id="line-703"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#SubScope"><span class="hs-identifier hs-type">SubScope</span></a></span><span> </span><span id="local-6989586621680934564"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680934564"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="GHC.Cmm.Node.html#GlobalScope"><span class="hs-identifier hs-var">GlobalScope</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-704"></span><span>                      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680934564"><span class="hs-identifier hs-var">us</span></a></span><span>
</span><span id="line-705"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#SubScope"><span class="hs-identifier hs-type">SubScope</span></a></span><span> </span><span id="local-6989586621680934563"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680934563"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621680934562"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934562"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934562"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'/'</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680934563"><span class="hs-identifier hs-var">us</span></a></span><span>
</span><span id="line-706"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span id="local-6989586621680934559"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934559"><span class="hs-identifier hs-var">combined</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; SDoc -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hcat"><span class="hs-identifier hs-var">hcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
</span><a href="GHC.Utils.Outputable.html#punctuate"><span class="hs-identifier hs-var">punctuate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'+'</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; [SDoc]) -&gt; [SDoc] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-707"></span><span>                        </span><span class="annot"><span class="annottext">([Unique] -&gt; SDoc) -&gt; [[Unique]] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hcat"><span class="hs-identifier hs-var">hcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; ([Unique] -&gt; [SDoc]) -&gt; [Unique] -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
</span><a href="GHC.Utils.Outputable.html#punctuate"><span class="hs-identifier hs-var">punctuate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'/'</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; [SDoc]) -&gt; ([Unique] -&gt; [SDoc]) -&gt; [Unique] -&gt; [SDoc]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Unique -&gt; SDoc) -&gt; [Unique] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">([Unique] -&gt; [SDoc])
-&gt; ([Unique] -&gt; [Unique]) -&gt; [Unique] -&gt; [SDoc]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[Unique] -&gt; [Unique]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([[Unique]] -&gt; [SDoc]) -&gt; [[Unique]] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-708"></span><span>                        </span><span class="annot"><span class="annottext">CmmTickScope -&gt; [[Unique]]
</span><a href="GHC.Cmm.Node.html#scopeToPaths"><span class="hs-identifier hs-var">scopeToPaths</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934559"><span class="hs-identifier hs-var">combined</span></a></span><span>
</span><span id="line-709"></span><span>
</span><span id="line-710"></span><span class="hs-comment">-- | Checks whether two tick scopes are sub-scopes of each other. True</span><span>
</span><span id="line-711"></span><span class="hs-comment">-- if the two scopes are equal.</span><span>
</span><span id="line-712"></span><span class="annot"><a href="GHC.Cmm.Node.html#isTickSubScope"><span class="hs-identifier hs-type">isTickSubScope</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-type">CmmTickScope</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-type">CmmTickScope</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-713"></span><span id="isTickSubScope"><span class="annot"><span class="annottext">isTickSubScope :: CmmTickScope -&gt; CmmTickScope -&gt; Bool
</span><a href="GHC.Cmm.Node.html#isTickSubScope"><span class="hs-identifier hs-var hs-var">isTickSubScope</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; CmmTickScope -&gt; Bool
</span><a href="#local-6989586621680934554"><span class="hs-identifier hs-var">cmp</span></a></span><span>
</span><span id="line-714"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621680934554"><span class="annot"><span class="annottext">cmp :: CmmTickScope -&gt; CmmTickScope -&gt; Bool
</span><a href="#local-6989586621680934554"><span class="hs-identifier hs-var hs-var">cmp</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><span class="hs-identifier">_</span></span><span>              </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="GHC.Cmm.Node.html#GlobalScope"><span class="hs-identifier hs-var">GlobalScope</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-715"></span><span>        </span><span class="annot"><a href="#local-6989586621680934554"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="GHC.Cmm.Node.html#GlobalScope"><span class="hs-identifier hs-var">GlobalScope</span></a></span><span>    </span><span class="annot"><span class="annottext">CmmTickScope
</span><span class="hs-identifier">_</span></span><span>                       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-716"></span><span>        </span><span class="annot"><a href="#local-6989586621680934554"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CombinedScope"><span class="hs-identifier hs-type">CombinedScope</span></a></span><span> </span><span id="local-6989586621680934552"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934552"><span class="hs-identifier hs-var">s1</span></a></span></span><span> </span><span id="local-6989586621680934551"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934551"><span class="hs-identifier hs-var">s2</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680934550"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934550"><span class="hs-identifier hs-var">s'</span></a></span></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; CmmTickScope -&gt; Bool
</span><a href="#local-6989586621680934554"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934552"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934550"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; CmmTickScope -&gt; Bool
</span><a href="#local-6989586621680934554"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934551"><span class="hs-identifier hs-var">s2</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934550"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-717"></span><span>        </span><span class="annot"><a href="#local-6989586621680934554"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span id="local-6989586621680934548"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934548"><span class="hs-identifier hs-var">s</span></a></span></span><span>              </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CombinedScope"><span class="hs-identifier hs-type">CombinedScope</span></a></span><span> </span><span id="local-6989586621680934547"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934547"><span class="hs-identifier hs-var">s1'</span></a></span></span><span> </span><span id="local-6989586621680934546"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934546"><span class="hs-identifier hs-var">s2'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; CmmTickScope -&gt; Bool
</span><a href="#local-6989586621680934554"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934548"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934547"><span class="hs-identifier hs-var">s1'</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; CmmTickScope -&gt; Bool
</span><a href="#local-6989586621680934554"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934548"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934546"><span class="hs-identifier hs-var">s2'</span></a></span><span>
</span><span id="line-718"></span><span>        </span><span class="annot"><a href="#local-6989586621680934554"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#SubScope"><span class="hs-identifier hs-type">SubScope</span></a></span><span> </span><span id="local-6989586621680934544"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680934544"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span id="local-6989586621680934543"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934543"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680934542"><span class="annot"><span class="annottext">s' :: CmmTickScope
</span><a href="#local-6989586621680934542"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#SubScope"><span class="hs-identifier hs-type">SubScope</span></a></span><span> </span><span id="local-6989586621680934541"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680934541"><span class="hs-identifier hs-var">u'</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680934544"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680934541"><span class="hs-identifier hs-var">u'</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; CmmTickScope -&gt; Bool
</span><a href="#local-6989586621680934554"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934543"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934542"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-719"></span><span>
</span><span id="line-720"></span><span class="hs-comment">-- | Combine two tick scopes. The new scope should be sub-scope of</span><span>
</span><span id="line-721"></span><span class="hs-comment">-- both parameters. We simplify automatically if one tick scope is a</span><span>
</span><span id="line-722"></span><span class="hs-comment">-- sub-scope of the other already.</span><span>
</span><span id="line-723"></span><span class="annot"><a href="GHC.Cmm.Node.html#combineTickScopes"><span class="hs-identifier hs-type">combineTickScopes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-type">CmmTickScope</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-type">CmmTickScope</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-type">CmmTickScope</span></a></span><span>
</span><span id="line-724"></span><span id="combineTickScopes"><span class="annot"><span class="annottext">combineTickScopes :: CmmTickScope -&gt; CmmTickScope -&gt; CmmTickScope
</span><a href="GHC.Cmm.Node.html#combineTickScopes"><span class="hs-identifier hs-var hs-var">combineTickScopes</span></a></span></span><span> </span><span id="local-6989586621680934540"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934540"><span class="hs-identifier hs-var">s1</span></a></span></span><span> </span><span id="local-6989586621680934539"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934539"><span class="hs-identifier hs-var">s2</span></a></span></span><span>
</span><span id="line-725"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934540"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; CmmTickScope -&gt; Bool
</span><a href="GHC.Cmm.Node.html#isTickSubScope"><span class="hs-operator hs-var">`isTickSubScope`</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934539"><span class="hs-identifier hs-var">s2</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934540"><span class="hs-identifier hs-var">s1</span></a></span><span>
</span><span id="line-726"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934539"><span class="hs-identifier hs-var">s2</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; CmmTickScope -&gt; Bool
</span><a href="GHC.Cmm.Node.html#isTickSubScope"><span class="hs-operator hs-var">`isTickSubScope`</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934540"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934539"><span class="hs-identifier hs-var">s2</span></a></span><span>
</span><span id="line-727"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; CmmTickScope -&gt; CmmTickScope
</span><a href="GHC.Cmm.Node.html#CombinedScope"><span class="hs-identifier hs-var">CombinedScope</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934540"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621680934539"><span class="hs-identifier hs-var">s2</span></a></span><span>
</span><span id="line-728"></span></pre></body></html>